引入方式:1.内嵌式:写在style标签内,通常写在head标签中;(小案例)
2.外联式:写在一个单独的.css文件中,通过link标签在网页中引入;(项目中)
3.行内式:写在标签的style属性中。(一般不用)
选择器:. class名{ } 或者 # id名{ }(常用前者)
>通配符:* { },例如 * {margin: 0px;
padding: 0px;}
字体:>font-style : italic(斜体)
>font-weight : normal, bold, 100-700(整百数,400正常,700加粗)
>font-size : 10px
>font-family : 微软雅黑,sans-serif(无衬线字体:粗细均匀,首位无装饰,例如黑体)
>复合属性:font : italic 700 66px 宋体(只能省略前俩个,默认值)
文本:>缩进 text-indent : 32px或者2em(em代表一个字大小,2em代表缩进俩个字大小位置)
>水平对齐 text-align:center
>文本修饰 text-decoration:underline(下划线),line-through(删除线),none(无装饰)
行高:上间距+文本高度+下间距
>line-height : 50px 或者 1.5(代表当前字体大小的倍数)
>复合属性:font :style weight size/line-height family
眼高手低,重在练习!!!
HTML要点
CSS要点_2
CSS要点_1
于 2022-01-19 11:37:59 首次发布