1、文本样式类
.txt{
/*改变文字大小*/
font-size: 12px;
/*字体*/
font-family: "Courier New";
/*字体加粗*/
font-weight: bold;
/*斜体*/
font-style: italic;
/*行高*/
line-height: 40px;
/*字体颜色*/
color: red;
}
2、文本位置类
.txt{
/*文本内部位置*/
text-align: center;
/*文本绘制基线*/
vertical-align: baseline;
/*缩进*/
text-indent: 2rem;
/*内边距*/
padding: 2rem;
/*外边距*/
margin: 2rem;
}
3、格式
.txt{
/*是否自动换行*/
white-space: nowrap;
/*长单词自动换行*/
word-wrap: break-word;
/*单词控制是否切分换行*/
word-break: normal;
/*阴影*/
text-shadow: 1px 1px;
/*文字划线*/
text-decoration: underline;
/*文本益出以...末尾显示*/
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
/*鼠标形状,wait等待等等*/
cursor: wait;
}
4、盒模型
.txt{
/*宽*/
width: 200px;
/*高*/
height: 200px;
/*内边距*/
padding: 20px 20px 20px 20px;
/*外边距*/
margin: 20px 20px 20px 20px;
/*边框*/
border: none;
/*圆角半径*/
border-radius: 5px;
/*超出部分如何显示*/
overflow: scroll;
/*将当前的属性指定倒内box还是外box*/
box-sizing: content-box;
/*外阴影 水平 垂直 模糊半径 模糊半径 颜色*/
box-shadow: 4px 4px 3px 3px red;
/*内阴影*/
box-shadow: inset 4px 4px 3px 3px red;
/*内外结合阴影*/
box-shadow: 4px 4px 3px 3px red, inset 4px 4px 3px 3px red;
/*效果boder一致,但不占据实际空间*/
outline: 1px solid red;
}