我無法在透明div上設置非透明字體。透明div上的不透明字體
我用這個CSS爲h3
,但它不工作。
.posterTextContainer {
position: absolute;
width: 100%;
background-color: orange;
left: 0;
bottom: 0;
z-index: 5;
text-align: center;
display: block;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
filter: alpha(opacity=70);
opacity: 0.7 !important;
-moz-opacity: 0.7;
-khtml-opacity: 0.7;
}
.posterTextContainer > h3 {
font-weight: bold;
color: white !important;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"!important;
filter: alpha(opacity=100)!important;
opacity: 1.0 !important;
-moz-opacity: 1.0 !important;
-khtml-opacity: 1.0 !important;
text-transform: uppercase;
margin: 0.4em 0.7em 0.5em 0.7em !important;
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis;
}
HTML
<div id="premieresList" class="owl-carousel owl-theme classPremieres" style="display:block; width:100%!important; height:auto!important;">
@if (ViewBag.Premieres != null)
{
foreach (var item in (List<.FilmView>)ViewBag.Premieres)
{
<div class="item" style="width:100%!important;">
<img class="owl-lazy" data-src="@item.FileUrl" alt="" style="border: 1px solid hsla(30, 96%, 52%, 0.6);" />
<div class="posterTextContainer">
<h3>
@item.Title.ToUpper()
</h3>
</div>
</div>
}
}
</div>
請幫助我。謝謝!
郵政所有代碼,所以我們有一個[MCVE] –
@MichaelCoker我沒有,它覆蓋證明彼此的代碼。 –
@Dimo - 好像你應該。你的HTML在哪裏?圖像在哪裏? –