2
美好的一天!我想問一下我該如何實現這種佈局? 正如你可以看到有一個背景,然後另一個不透明的容器 然後文本是透明的。不透明度的文本透明度CSS
我想上班就可以了,但我失敗了,在這裏我目前的工作。我曾經把文本剪輯到背景,看起來像是什麼,但方法是錯誤的。
我的HTML:
<div class="container-fluid" id="landing-sec">
<div class="container-fluid sec_about" >
<h1>stack overflow</h1>
</div>
</div>
這裏是我當前的青菜:
.sec_about
{
margin-top: 80px;
background-color:white;
height:450px;
opacity: 0.65;
filter: alpha(opacity=65); /* For IE8 and earlier */
h1
{
background: url('../img/bg1.jpg') no-repeat;
// text-rendering: optimizeLegibility;
text-transform: uppercase;
font-size: 65px;
font-weight: bold;
font-family: $roboto_bold;
text-align: center;
z-index: 2;
white-space: nowrap;
margin-top: 30px;
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
}
}
謝謝您的幫助。我會很樂意欣賞它,它將成爲我的教訓。
耶我使用了backgroud-clip。很好,但我不在工作。你能幫我嗎 ?謝謝 – Jonas
@Jonas我已經用你的代碼更新了我的代碼,請看一看,讓我知道它是否有幫助? –