基础知识
小于 1 分钟
选择器
/* 通配选择器 */
* {
box-sizing: border-box;
}
/* 元素选择器 */
html,body,ul,li,ol,dl,dd,p {
margin: 0;
padding: 0;
list-style: none;
}
/* id选择器 */
#selector-0 {
width: 30px;
height: 30px;
background: green;
}
/* 类选择器 */
.frame {
height: 500px;
}
.color {
float: left;
width: 100px;
height: 100px;
background: rgba(204, 91, 91);
}
.color-0 {
float: left;
width: 100px;
height: 100px;
background: rgba(204, 91, 91, 0.5);
}
.color-1 {
float: left;
width: 100px;
height: 100px;
background: rgba(204, 91, 91);
opacity: 0.5; /* 影响子节点 */
}
/* 主要应用在文本的多列布局方面 */
.colums-0 {
width: 450px;
columns: 150px 3; /* 默认是有gap的 */
column-gap: 0;
}
.flex {
display: flex;
}