标签:round width yellow BMI mit window tle border char
使用Js的对象属性能实现简单的翻转效果。通过onMouseover事件和onMouseOut事件就能实现鼠标移到链接上和移开链接发生反应。给两个图片加上链接实现都能翻转的效果。
reverse.html
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>图片翻转Demo</title> <style type="text/css"> h1{color:yellow; text-align:center;} </style> </head> <body> <h1>实现图片翻转</h1> <img src="smile.jpg" name="smileimage" onMouseOver="window.document.smileimage.src=‘smilereverse.jpg‘;" onMouseOut="window.document.smileimage.src=‘smile.jpg‘;" > <br> <p> <a href="#" onMouseOver="window.document.smileimage.src=‘smilereverse.jpg‘;" onMouseOut="window.document.smileimage.src=‘smile.jpg‘;" ><img src="submit.png" name="turn" border="0" width="298" height="68"></a> </p> </body> </html>
标签:round width yellow BMI mit window tle border char
原文地址:https://www.cnblogs.com/mugglean/p/8877262.html