ホーム HTML CSS XML JAVASCRIPT   PHP SQL MORE...   リファレンス 事例集    

CSS3 opacity プロパティ

CSS3 Reference 完全な CSS3 リファレンス

Set the opacity level for a div element:

div
{
opacity:0.5;
}

Try it yourself »
More examples at the bottom of this page.

ブラウザ・サポート

Internet Explorer Firefox Opera Google Chrome Safari

opacity property is supported in all major browsers.

注: IE8 and earlier supports an alternative, the filter property. Like: filter:Alpha(opacity=50).


定義と用法

opacity property sets the opacity level for an element.

デフォルト値: 1
継承: no
バージョン: CSS3
JavaScript構文: object.style.opacity=0.5


構文

opacity: value|inherit;

説明
value Specifies the opacity. From 0.0 (fully transparent) to 1.0 (fully opaque)
inherit The value of the opacity property should be inherited from the parent element


Examples

Try it Yourself - Examples

Change the opacity for an element
This example demonstrates how to use a JavaScript to change the opacity for an element.


CSS3 Reference 完全な CSS3 リファレンス