美好的一天,我正在为我的学习做一些实验,是否可以将:before标签添加到现有的:before标签中,因为您可以在我创建的tru figma图像上看到灰色背景的图像:现在,在标记之前,我想在其中添加文本“设计”,是否有这种方法或可行?
@import url('https://fonts.googleapis.com/css?family=Poppins:400,700,800,900&display=swap');
*
{
font-family: 'Poppins', sans-serif;
margin: 0;
padding: 0;
}
.container {
position: relative;
padding: 0 100px;
}
.container::before
{
content: 'Design';
position: absolute;
top: 0;
right: 0;
width: 330px;
height: 100vh;
background: #767373;
color: color: rgba(0, 0, 0, 0.24);
z-index: -2;
}
header
{
display: flex;
justify-content: space-between;
align-items: center;
padding: 30px 0;
}
header .logo
{
font-weight: 700;
text-transform: uppercase;
color: #000;
text-decoration: none;
font-size: 30px;
}
header .logo span
{
color: #004585;
}
header ul
{
position: relative;
display: flex;
}
header ul li
{
list-style: none;
margin: 0 20px;
}
header ul li a {
position: relative;
text-decoration: none;
font-size: 18px;
color: #000;
}
<div class="container">
<header>
<a href="#" class="logo">Jury<span>Design</span></a>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Portfolio</a></li>
<li><a href="#">Contact</a></li>
</ul>
</header>
</div>