css 透明效果 div
定义1:
.div_transparent, .div_time, .div_rpt_now, . div_suggestion,. div_ap_item
{
text-align: center;
filter:alpha(opacity=100); /* IE */ -moz-opacity:1.0; /* Moz + FF */
opacity: 1.0;
background:#ccc;
}
.div_ap_item
{
top: 10px;
left: 5px;
height: 80px;
width: 90px;
line-height: 20px;
font-size: small;
color: #006600;
font-family: 微软雅黑;
text-align: center;
}
定义2:
.div_ap_item
{
text-align: center;
filter:alpha(opacity=100); /* IE */ -moz-opacity:1.0; /* Moz + FF */
opacity: 1.0;
background:#ccc;
}
.div_ap_item
{
top: 10px;
left: 5px;
height: 80px;
width: 90px;
line-height: 20px;
font-size: small;
color: #006600;
font-family: 微软雅黑;
text-align: center;
}
我一直认为这两种定义方式的效果应该是一样的,奇怪的是,定义1可以产生透明效果;定义2却没有
怎么回事呢?
回复讨论(解决方案)
.div_transparent, .div_time, .div_rpt_now, . div_suggestion, . div_ap_item
注意空格
.div_transparent, .div_time, .div_rpt_now, .div_suggestion, .div_ap_item
大哥
你的定义1里面“. div_ap_item”明显有个空格啊