Heim  >  Artikel  >  Web-Frontend  >  CSS3透明属性opacity_html/css_WEB-ITnose

CSS3透明属性opacity_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:32:251789Durchsuche

例子:

<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特效 

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn