獎金道具讓誰能弄清楚爲什麼這不起作用。出於某種原因,我的文本「即內容,菜單,頁腳」繼承了不透明性,並不是坐在一個不透明的地方,並且完全可見。使透明文字透明的CSS透明
我有它設置爲兩個是類和ID我都試過兩種方式,和我相當的CSS實際上
<style type="text/css">
div#page {
border:0px solid purple;
width:700px;
margin:0 auto;
padding:5px;
text-align:left;
background-image:url('images/layout.jpg');
}
div {
text-align:center;
}
div#header {
border:2px solid red;
width:695px;
height:30px;
}
div#mostpop {
border:2px solid black;
width:195px;
float:Right;
margin:10px 0px 10px 5px;
height:245px;
background-color:#ffffff;
opacity:0.7;
filter:alpha(opacity=60); /* For IE8 and earlier */
}
div#recent {
border:2px solid black;
width:195px;
float:Right;
margin:10px 0px 10px 0px;
height:245px;
position: relative;
left: 204px;
top: 255px;
background-color:#ffffff;
opacity:0.7;
filter:alpha(opacity=60); /* For IE8 and earlier */
}
div#content {
border:2px solid black;
width:495px;
margin:10px 0 10px 0px;
min-height:500px;
background-color:#ffffff;
opacity:0.7;
filter:alpha(opacity=60); /* For IE8 and earlier */
}
div#footer {
border:2px solid black;
width:695px;
height:30px;
background-color:#ffffff;
opacity:0.7;
filter:alpha(opacity=60); /* For IE8 and earlier */
div.recent p
{
margin:30px 40px;
font-weight:bold;
color:#000000;
opacity:1;
}
div.content p
{
margin:30px 40px;
font-weight:bold;
color:#000000;
opacity:1;
}
div.mostpop p
{
margin:30px 40px;
font-weight:bold;
color:#000000;
opacity:1;
}
div.footer p
{
margin:30px 40px;
font-weight:bold;
color:#000000;
opacity:1;
}
div.header p
{
margin:30px 40px;
font-weight:bold;
color:#000000;
opacity:1;
}
</style>
<div id="page">
<!--<div id="header">Header</div>-->
<div class="mostpop" id="mostpop"><p>Menu</p></div>
<div class="recent" id="recent"><p>Menu</p></div>
<div class="content" id="content"><p>Content</p></div>
使用RGBA,而不是http://robertnyman.com/2010/01/11/css-background-transparency-without-affecting-child-elements-through-rgba-and-filters/ – Jrod
您使用IE瀏覽器? –
您無法將子元素的不透明度增加到大於其父元素的值。 – Quantastical