文本
设置文本的属性,除了颜色之后,其他的都是以 text-开头的
- 颜色 color
颜色名 16 进制 rgb 值 red-green-blue - 居中 text-align:center right left justify[杂志 报纸用]
- 修饰 text-decoration: none 属性用来设置或删除文本的装饰
- 文本转换 text-transform: uppercase owercase capitalize[首字母大写]
- 文本缩进 text-indent 第一行缩进
字体
所有的字体相关的样式都含有 font 关键字,注意没有颜色 无font-color
- font-family 属性设置文本的字体系列。
- font-style 是否倾斜 normal italic
- font-size 字体大小
- font-weight :字体粗细
- font 在一个声明中设置所以的字体属性
链接 a 及伪类选择器
伪类选择器是根据连接的状态而动态变化的
- a:link 正常 ,未被访问过的链接
- a:visited 用户已经访问过的链接
- a:hover
- a:active 鼠标被点击的那一刻 那一个瞬间
列表
- list-style:用于把所有的属性设置在一个声明中
- list-style-type: circle square lower-alpha upper-roman
- list-style-image:url(‘sqpurple.gif’);
表格
- border 默认边框是双边框 折叠边框 border-collapse collapse 折叠
- width height
- text-align 文字水平对齐方式 vertical-align:bottom top
- padding 表格填充
- 文本颜色 color 背景颜色 background-color
border
- border 属性 通过很多属性来设置 或者通过一个属性来设置
- border-style ;
- border-width ;
- border-color
outline
outline 是绘制于元素周围的一条线,位于边框边缘的外围,可起到突出元素的作用。【紧挨边框】
margin 外边距
边距 边距 只能定义距离 无 style 无 color 颜色必须为透明
margin:25px
margin-top-width 因为只有这一个属性 因此写为 margin-top 省略 width
padding 内边距
边距 边距 只能定义距离 无 style 无 color 颜色必须为透明
定义内容和边框之间的距离
padding padding-top padding-right padding-bottom 没有 padding-top-width