文字下划线,颜色
text-decoration: aqua underline;
文字后退10个fontsize
text-indent: 10em;
目标元素模糊
filter: blur(5px);
display
none
隐藏元素且不保留位置
<style>
.a{
display: none;
}
</style>
<body>
<div class="a">helo</div>
<div>yes</div>
</body>
visibility
hidden
隐藏元素但保留位置
<style>
.a{
visibility:hidden;
}
</style>
<body>
<div class="a">helo</div>
<div>yes</div>
</body>
overflow
hidden
文字超出div长宽不显示
auto以滑动条方式显示
<style>
.a{
overflow: hidden;
height: 200px;width: 200px;
border: hotpink 1px solid;
font-size: 50px;
}
</style>
<body>
<div class="a">helogjfkl
jgfkjdkjgkljslkgs
</div>
<div>yes</div>
</body>
选择器
li:nth-child(2n){
background-color: green;
}
li:nth-child(2n+1){
background-color: yellow;
}
网友评论