编辑下面的代码:【加编码】
<html> <head> <style> img { opacity:0.4; filter:alpha(opacity=40); /* For IE8 and earlier */ } img:hover { opacity:1.0; filter:alpha(opacity=100); /* For IE8 and earlier */ } </style> </head> <body> <h1>Image Transparency</h1> <img src="/demo/klematis.jpg" width="150" height="113" alt="klematis"> <img src="/static/images/klematis2.jpg" width="150" height="113" alt="klematis"> <p><b>Note:</b> In IE, a &amp;lt;!DOCTYPE&amp;gt; must be added for the :hover selector to work on other elements than the &amp;lt;a&amp;gt; element.</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂