【发布时间】:2012-07-28 22:31:12
【问题描述】:
我只想为左下角的 div 赋予不透明度。 可能吗?怎么样?
<div id="right_img"></div>
css
#right_img
{
float:right;
width:600px;
height:400px;
margin-top:100px;
background:url(../images/assets/sobrf-maria-page.jpg) no-repeat bottom center;
opacity:0.6;
filter:alpha(opacity=60);
}
如果我给整个 div 赋予不透明度,图像清晰度将会丢失。
【问题讨论】:
-
我不认为可以使用 CSS 为元素的特定区域赋予不透明度,除非您使用带有 RGBA 的 CSS 宏。也许你有一个你想要完成的例子,比如一个模型?
-
使用 html5 canvas 和 javascript 来做这些事情。
标签: html css background opacity