css鼠标滑过/指向图片变色变暗变亮

WBOY
Release: 2016-06-01 09:53:04
Original
4471 people have browsed it

实例代码如下:

<code class="language-html"><style>
*{margin:0;padding:0;list-style:none;}
img{border:1px solid #ccc}
.info li { padding:5px;width:144px;float:left}
.info li .img { padding:5px; border:1px solid #CBCBCB;display:block;}
.info li .img:link,.info li .img:visited {border:1px solid #CBCBCB;}
.info li .img:hover{border:1px solid #CBCBCB;background:#f0f0f0;filter:alpha(Opacity=80);-moz-opacity:0.8;opacity: 0.8}
</style>



<div class="info">
<ul>
<li><a href="#" class="img"><img  src="#" alt="css鼠标滑过/指向图片变色变暗变亮" ></a></li>
<li><a href="#" class="img"><img  src="#" alt="css鼠标滑过/指向图片变色变暗变亮" ></a></li>
<li><a href="#" class="img"><img  src="#" alt="css鼠标滑过/指向图片变色变暗变亮" ></a></li>
</ul>
</div></code>
Copy after login

大家可以参考 css3 opacity 属性

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!