CSS 基础
2015-09-16 21:04
603 查看
如何在HTML中加CSS
1、在外部链接样式
link:<link type="text/css" rel="stylesheet" href="路径">
2、嵌入式
<style type="text/css">内容</style>
3、内链式
<a style="color: red"></a>
CSS的定位
float
CSS文本
1、text-indent 缩进段落文本
2、text-align 水平居中
3、justify 在段落文本中两端对齐
4、word-spacing 字与字之间的间隔
5、letter-spacing 字母与字母之间的间隔
6、text-transform 处理英文的大小写有4个值:none uppercase lowercase capitalize
7、text-decoration 文字的装饰
8、white-space 处理空白符有5个值:nowrap pre pre-line pre-wrap normal
9、direction 改变书写方向有两个值:ltr rtl
10、color 设置颜色
11、line-height 设置行高(一般设置上下居中)
CSS伪类
1、:link 未访问的链接
2、:visited 已访问的链接
3、:hover 鼠标光标移动到标签上
4、:active 选定的链接
CSS伪元素
1、:first-line 首行设置特殊样式
2、:first-letter 首字母设置特殊样式
3、:before 当前的内容前面插入新内容
4、:after 当前的内容之后插入新内容
1、在外部链接样式
link:<link type="text/css" rel="stylesheet" href="路径">
2、嵌入式
<style type="text/css">内容</style>
3、内链式
<a style="color: red"></a>
CSS的定位
float
CSS文本
1、text-indent 缩进段落文本
2、text-align 水平居中
3、justify 在段落文本中两端对齐
4、word-spacing 字与字之间的间隔
5、letter-spacing 字母与字母之间的间隔
6、text-transform 处理英文的大小写有4个值:none uppercase lowercase capitalize
7、text-decoration 文字的装饰
8、white-space 处理空白符有5个值:nowrap pre pre-line pre-wrap normal
9、direction 改变书写方向有两个值:ltr rtl
10、color 设置颜色
11、line-height 设置行高(一般设置上下居中)
CSS伪类
1、:link 未访问的链接
2、:visited 已访问的链接
3、:hover 鼠标光标移动到标签上
4、:active 选定的链接
CSS伪元素
1、:first-line 首行设置特殊样式
2、:first-letter 首字母设置特殊样式
3、:before 当前的内容前面插入新内容
4、:after 当前的内容之后插入新内容
相关文章推荐
- 一个关于CSS选择器“优先级”的新问题
- ListView--QQ联系人样式
- 泡泡同学带你玩转css
- css取消div蹭上的鼠标点击事件
- 去除img图片之间的空隙css样式
- CSS
- HTML&CSS Learning Notes 4
- 13年总结js,css,java xml
- Qt绘图之QGraphicsScene QGraphicsView QGraphicsItem详解
- css3阴影设置发光边框效果
- css3--background属性
- css通配符
- CSS选择器的优先级
- 不错的VS2010扩展——JSEnhancements,让js和css也折叠(转)
- CSS3Ps -Photoshop图层特效转CSS3代码
- vagrant中css,img不生效的问题
- css+html菜单适应性学习的宽度
- css3--border属性
- css解决文字垂直居中
- CSS display:table属性用法解析