Highlighted

Image rollover snippets in Dreamweaver cc add transition

New Here ,
Jul 17, 2018

Copy link to clipboard

Copied

hi, how do you add an ease transition of 0.5s to the rollover images after inserting them with the dreamviewer cc snippet?

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

I have no use for those outdated MM rollover behaviors.  I'm kind of surprised DW hasn't deprecated them.

You can do exactly what you want with CSS.  But keep in mind that touch devices don't have a mouse so hover effects don't do anything.

Swap Image on Hover - With CSS

Views

362

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Image rollover snippets in Dreamweaver cc add transition

New Here ,
Jul 17, 2018

Copy link to clipboard

Copied

hi, how do you add an ease transition of 0.5s to the rollover images after inserting them with the dreamviewer cc snippet?

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

I have no use for those outdated MM rollover behaviors.  I'm kind of surprised DW hasn't deprecated them.

You can do exactly what you want with CSS.  But keep in mind that touch devices don't have a mouse so hover effects don't do anything.

Swap Image on Hover - With CSS

Views

363

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 17, 2018 0
Adobe Community Professional ,
Jul 17, 2018

Copy link to clipboard

Copied

Which snippet are you talking about?

Please show us your code.

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 17, 2018 0
New Here ,
Jul 17, 2018

Copy link to clipboard

Copied

<a href="#" onMouseOut="MM_swapImgRestore()"     onMouseOver="MM_swapImage('porsche_356','','assets/porsche_356_sabbiatura_dopo_300x200.jpg',1)">

<img src="assets/porsche_356_sabbiatura_prima_300x200.jpg" alt="" width="300" height="200" class="img-lavorazioni" id="porsche_356"></a>

<script>

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;

}

function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a.indexOf("#")!=0){ d.MM_p=new Image; d.MM_p[j++].src=a;}}

}

function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d)&&d.all) x=d.all; for (i=0;!x&&i<d.forms.length;i++) x=d.forms;

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}

function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

</script>

this is the test published:

https://alessiopaolettidesign.it/sabbiaturapg/

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 17, 2018 0
Adobe Community Professional ,
Jul 17, 2018

Copy link to clipboard

Copied

I have no use for those outdated MM rollover behaviors.  I'm kind of surprised DW hasn't deprecated them.

You can do exactly what you want with CSS.  But keep in mind that touch devices don't have a mouse so hover effects don't do anything.

Swap Image on Hover - With CSS

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 17, 2018 0
New Here ,
Jul 17, 2018

Copy link to clipboard

Copied

You're right, it's better this way, maybe even try to disable it for smartphones.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 17, 2018 0