在外面浪了几天哈哈,然后今天继续学习咯。 顺便分享一只吃草少女。
一、文字
1、分别设置
斜正:font-style
粗细:font-weight
大小:font-size
行距:line-height
字体:font-family
2、统一设置
font:italic bold 20px/40px "SimHei"
3、设置技巧
有衬线:sans-serif
无.衬线:serif
设置字体,客户及其未必有。
font-family:"微软雅黑","黑体",sans-serif;
二、图片
1、分别设置
background-color:
background-image:url();
background-repeat:repeat-x|y no-repeat;
background-attachment:fixed;
2、统一设置
background:gray url(small.jpg) no-repeat -150px -325px;
3、位置
background-position:center| center top| right center;
background-position:-150px -325px;
三、控制器
id 控制器 #test
class 控制器 .test
标签控制器 div
派生控制器 div p
四、引入
head中写入<style>.......</style>
html标签写<div style=“color:red;”></div>
外部引入css文件,写link tab后写地址 ./css1.css
import导入css文件,@import url(css2.css);
无、初始化
防止各浏览器显示不一致的情况。