• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Image rollover snippets in Dreamweaver cc add transition

New Here ,
Jul 17, 2018 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?

Views

693

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
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 17, 2018 Jul 17, 2018

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

Votes

Translate

Translate
Community Expert ,
Jul 17, 2018 Jul 17, 2018

Copy link to clipboard

Copied

Which snippet are you talking about?

Please show us your code.

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

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
community guidelines
New Here ,
Jul 17, 2018 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/

Votes

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
community guidelines
Community Expert ,
Jul 17, 2018 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— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

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
community guidelines
New Here ,
Jul 17, 2018 Jul 17, 2018

Copy link to clipboard

Copied

LATEST

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

Votes

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
community guidelines