码迷,mamicode.com
首页 > Web开发 > 详细

(三)学习CSS之opacity 属性

时间:2014-09-02 22:48:55      阅读:262      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   div   sp   log   html   c   

参考:http://www.w3school.com.cn/cssref/pr_opacity.asp

opacity 属性设置元素的不透明级别。

<!DOCTYPE html>
<html>
<head>
<style> 
div
{
background-color:red;
opacity:0.5;
filter:Alpha(opacity=50); /* IE8 以及更早的浏览器 */
}
</style>
</head>
<body>

<div>本元素的不透明度是 0.5。请注意,文本和背景色都受到不透明级别的影响。</div>

</body>
</html>

 

(三)学习CSS之opacity 属性

标签:style   blog   http   color   div   sp   log   html   c   

原文地址:http://www.cnblogs.com/wiming/p/3952418.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!