css如何?滑鼠滑過縮圖時放大圖片

來源:互聯網
上載者:User
本篇文章主要介紹css如何?滑鼠滑過縮圖時放大圖片,日常購物網站中非常方便實用,有興趣的小夥伴參考下。

代碼如下:

<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>www.php.cn php中文網 滑鼠滑過縮圖時放大圖片</title> <style type="text/css"> <!-- * {margin:0;padding:0;} body {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;} img {border:0} p {font-size:14px;} #imgmove li {float:left; width:50px; height:40px; display:block; overflow:visible;*overflow:hidden; margin:0px 5px; border:3px #333 solid;position:relative;*position:static;} #imgmove img {position:absolute;left:0px;top:0px;clip:rect(0px 50px 40px 0px);z-index: 0;*position:static;} #imgmove img:hover {position:relative; left:-3px; top:-3px; border:3px #f00 solid; z-index:2; clip:rect(0px 137px 137px 0px);} --> </style> </head> <body> <p>本例旨在展示滑鼠滑到縮圖上時,放大圖片。</p>      <!--[if IE 6]><a href="#"><![endif]--> <ul id="imgmove">   <li><img src="http://img4.pcpop.com/WallImages/0x0/0/190/000190571.jpg" /></li> </ul> <!--[if IE 6]></a><![endif]--> </body> </html>

相關推薦:

如何使用HTML+CSS做出滑鼠划過就可以顯示二級功能表列

CSS3實戰開發: 手把手教大家實戰開發滑鼠划過圖片動畫特效(第二彈)_html/css_WEB-ITnose

css3滑鼠划過圖片散開特效_html/css_WEB-ITnose

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.