css3圖片模糊過濾效果


css3圖片過濾效果,鼠標放上后其它圖片模糊,鼠標所在位置的圖片是清淅的,有效索引出當前的圖片,對圖片的模糊處理是本特效的亮點,你完全可以將模糊的效果應用於其它的圖片特效中,你同樣也可借此代碼研究一下HTML5中的CSS3技術。

體驗效果:
http://keleyi.com/a/bjad/yin8b5eb.htm

代碼如下:

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2 <html xmlns="http://www.w3.org/1999/xhtml">
 3 <head>
 4     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5     <title>css3圖片模糊過濾特效-柯樂義</title>
 6     <style>
 7 .keleyi img{ width:200px; height:200px;}
 8     .keleyi{
 9       list-style: none;
10       margin: 10px auto; padding: 0;
11       width: 642px; /* (200+10+4)x3 */
12       font-size: 0; /* fix inline-block spacing */
13     }
14     .keleyi li{
15         display: inline-block;
16         *display: inline;
17         zoom: 1;
18         width: 200px; height: 200px;
19         margin: 2px;
20         border: 5px solid #fff;
21         -moz-box-shadow: 0 2px 2px rgba(0,0,0,.1);
22         -webkit-box-shadow: 0 2px 2px rgba(0,0,0,.1);
23         box-shadow: 0 2px 2px rgba(0,0,0,.1);
24         -webkit-transition: all .3s ease;
25         -moz-transition: all .3s ease;
26         -ms-transition: all .3s ease;
27         -o-transition: all .3s ease;
28         transition: all .3s ease;        
29     }
30 
31     .keleyi:hover li:not(:hover){       
32         -webkit-filter: blur(2px) grayscale(1);
33         -moz-filter: blur(2px) grayscale(1);
34         -o-filter: blur(2px) grayscale(1);
35         -ms-filter: blur(2px) grayscale(1);
36         filter: blur(2px) grayscale(1);
37         opacity: .7; /* fallback */        
38     }
39   
40   </style>
41 </head>
42 <body>
43     <div style="width: 736px; margin: 0px auto;"><h2>css3圖片模糊過濾特效·柯樂義</h2>
44         請使用支持CSS3的瀏覽器,移動光標到圖片上。 <a href="http://keleyi.com/a/bjad/yin8b5eb.htm" target="_blank">原文</a>
45     </div>
46     <ul class="keleyi">
47         <li>
48             <img src="http://keleyi.com/image/a/mdvii14p.jpg"></li>
49         <li>
50             <img src="http://keleyi.com/image/a/968oqhtf.jpg"></li>
51         <li>
52             <img src="http://keleyi.com/image/a/crgi0c5y.jpg"></li>
53     </ul>
54 </body>
55 </html>

web前端:http://www.cnblogs.com/jihua/p/webfront.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM