プロが教える店舗&オフィスのセキュリティ対策術

背景画像をCSSコードで半透明にしたいのですが・・
考えたコードはこのようです。
#sub{
background-image: url(背景画像);
background-repeat: no-repeat;
background-position: center center;
float:left;
filter:alpha(opacity=50)
opacity:0.5;
width:540px; /* D */
height:300px;
}

これだと背景を半透明にはできませんでした。
どのようにすればいいですか?

A 回答 (1件)

#sub{


background-image: url(背景画像);
background-repeat: no-repeat;
background-position: center center;
float:left;
filter:alpha(opacity=50);
opacity:0.5; -moz-opacity:0.5;
width:540px; /* D */
height:300px;
}
    • good
    • 1

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!