标签为人们在Web上看到的视觉内容提供方向或配方,它们可以通过CSS进行样式化、定向、修改、通过Javascript注入,因此即使它们是空的,也可以拥有一个实用程序,这取决于上下文。
由于您没有提供任何特定的上下文,下面是一个只显示空文本和彩色形状的示例
<span>
标签:
span{
display:block;
width:50px;
height:50px;
background-color:yellow;
border-radius: 100%;
}
span:first-child{
margin-top:20px;
background-color:red;
}
span:last-of-type{
background-color:green;
}
span:first-child::after{
content: "Dare to say to this cute traffic light that he is pointless ð¦";
position:absolute;
top:0;
}
span:first-child::before{
position:absolute;
background-color:black;
height:150px;
width:50px;
z-index:-1;
content:"";
}
span:last-of-type::before{
position:absolute;
background-color:black;
height:150px;
width:20px;
z-index:-1;
left:22px;
top:150px;
content:"";
}
<span></span>
<span></span>
<span></span>