Home >Web Front-end >HTML Tutorial >CSS3透明属性opacity_html/css_WEB-ITnose

CSS3透明属性opacity_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:32:251845browse

例子:

<div id="fixhovertree" style="position:fixed;left:100px;width:120px;top:100px;opacity:0.5;background-color:silver;color:red">何问起<a href="http://hovertree.com/hvtart/bjae/q3etb2qv.htm" target="_blank">效果</a></div>

查看效果:http://hovertree.com/hvtart/bjae/q3etb2qv.htm

 

设置 div 元素的不透明级别:
div
{
opacity:0.5;
}


opacity 属性设置元素的不透明级别。
默认值: 1
继承性: no
版本: CSS3
JavaScript 语法: object.style.opacity=0.5

value 规定不透明度。从 0.0 (完全透明)到 1.0(完全不透明)。

inherit 应该从父元素继承 opacity 属性的值。

 

博客园 roucheng js,jquery,css,html5特效 

Statement:
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