如何在封面圖像上放置漸變圖層?CSS - 封面圖像上的漸變?
例如:
header {
position: relative;
height: 300px;
background-repeat: no-repeat;
background-position: center bottom;
background-image: url('http://www.planwallpaper.com/static/images/Free-Wallpaper-Nature-Scenes.jpg');
background-size: cover;
border-bottom-left-radius: 50%;
border-bottom-right-radius: 50%;
}
h1 {
margin: 0;
padding: 100px 0;
font: 44px "Arial";
text-align: center;
}
header h1 {
color: white;
}
<header>
<h1>Header Content</h1>
</header>
<section>
<h1>Section Content</h1>
</section>
我想這個梯度的形象:
background-image: linear-gradient(to bottom right, #002f4b, #dc4225);
這可能嗎?
在你的情況,你纔可能更換梯度,而不是圖像。如果你想要通過這個圖像,你需要添加另一個梯度塊。 –