1.文本中大小写字母转换—text-transform
属性值:
uppercase;(全部大写)
lowercase;(全部小写)
capitalize;(在所有小写单词中,首字母大写)
p{
text-transform:uppercase;
}
2.文本居中——text-align
属性值:
center;(居中)
left;(左边对齐)
right(右边对齐)
p{
text-align:center;
}
3.段落缩进—–text-indent
em(是以字为单位),±都可以
p{
text-indent: 3em;
}
4.设置文字装饰效果——text-decoration
属性值:
none(去掉下划线)
underline(加下划线)
overline(加上划线)
line-through(加删除线)
a{
text-decoration:none;
}
5.设置段落行高—-line-height
属性值:百分比,px,数字
a{
line-height:13px;
}
6.设置字词间距
word-spacing(只对英文有用)
letter-spacing(汉字和英文都可以)
p{
letter-spacing: 16px;
}
7.段落间距-margin
p{
margin: 66px;
}
8.边框——border
属性值有三个:大小,颜色,样式;
边框样式有:solid(实线),dashed(虚线),dotted(点线)
p{
border:3px lightgreen solid;
}
9.空格——white-space
属性值:
pre;(与预设一样)
nowrap;(文字不自动换行)
inherit;(继承父本)
normal;(显示一个)
p{
white-space: pre;
}
10.设置输入法状态-ime-mode
属性值:
auto;默认
active;激活本地语言输入法;
inactive:激活非本地语言输入法;
disabled;禁止输入法,不能输入汉字
21:29 2018/8/12/周日