我对网页设计和了解我正在浏览 YouTube 的网站布局相当陌生,我看到了这个视频,视频博主解释了他最喜欢的 5 个网站设计。
有时1:44
他开始谈论单页设计并谈论SplitSecnd。我喜欢他们的背景设计方式。
我知道如何为div
元素赋予不同的背景图像或颜色,但我想知道如何创建相似或复制它们的背景?他们的背景有图像和一个三角形,然后一个新的部分开始:)
对此的任何帮助将不胜感激。我会很感激一些示例代码的解释:)
<!DOCTYPE html>
<html>
<title> Lot of Divs </title>
<style>
body{
margin: 0;
padding: 0;
}
.content{
width: 1280px;
height: 800px;
font-family: "Courier New",monospaced;
font-size: 18px;
color: white;
}
#div1{
background-image: url("../img/mentalist-1.jpg");
background-repeat: no-repeat;
margin: 0;
padding: 0;
}
#div2{
background-image: url("../img/prisonbreak-1.jpg");
background-repeat: no-repeat;
margin: 0;
padding: 0;
}
p{
text-align: justify;
}
</style>
<body>
<div class = "content" id="div1">
<p>
An infamous 'psychic' abandons his public persona, outing himself as a fake, to focus on his work as a consultant
for the California Bureau of Investigation in order to find "Red John," the madman who killed his wife and daughter.
</p>
</div>
<div class = "content" id="div2">
<p>
Structural Engineer Michael Scofield turns himself in to the Fox River Penitentiary in order to break out his brother Lincoln Burrows,
who is on death row for the murder of the Vice President's brother.
But Lincoln was set up by some of the Company (an agency formed by corrupt government officials) guys,
headed by General Jonathan Krantz. Michael breaks out from Fox River with his brother Lincoln and other convicts
</p>
</div>
</body>
</html>
我想要实现的是: