css实操:day01
字体
字体综合性写法:
(顺序不能乱,且必须有字号和字体)
font: font-style font-weight font-size font-family;
例:font: italic 700 20px “微软雅黑”;
字体粗细:font-weight:100~900
400=normal、700=bold(加粗)
文本
文字居中对齐:text-align:center
行间距:line-height:25px (一般比字号大7,8像素)
段落首行缩进:text-indent:2em (1em是一个汉字的宽度)
文本装饰:text-decoration:none(取消下划线) ;text-decoration:underline(添加下划线)
字符间距:letter-spacing:2px
关于input标签的css样式
使用标签选择器,type不同。
input[type="text"]{
color: red;
font-size: 12px;
}
input[type="button"]{
color: #008000;
font-size: 12px;
}