css样式字体相关属性及背景相关属性
2016-06-04 21:31
501 查看
css样式:
在外部新建一个css样式,在网页文件中添加:
<link rel=”StyleSheet”type=”text/css” href=”style.css”>
css之字体相关属性:
字体大小:font-size:”2px” (“2%” “smaller” ”larger” ):相对于父窗口
字体样式:font-family:”微软雅黑,宋体“(当浏览器无法显示第一个,则再显示第二个)
字体厚度:font-weight:”normal” “bold” “bolder” “lighter” “100-900”
字体样式:font-style: normal 斜体:italic 倾斜:oblique
字母变大写:font-variant:small-caps;输入的小写字母变成大写
css之背景相关属性:
背景颜色:background-color:red
背景图片:background-image:url(‘xxx’)
背景重复:background-repeat: (repeat-x repeat-y)等价于repeat
no-repeat
背景位置(横向,纵向):background-position: left top
center center
right bottom
20px 20px
总结:以上背景属性归一 background:#f60 url(‘xxx’)
no-repeat top center
在外部新建一个css样式,在网页文件中添加:
<link rel=”StyleSheet”type=”text/css” href=”style.css”>
css之字体相关属性:
字体大小:font-size:”2px” (“2%” “smaller” ”larger” ):相对于父窗口
字体样式:font-family:”微软雅黑,宋体“(当浏览器无法显示第一个,则再显示第二个)
字体厚度:font-weight:”normal” “bold” “bolder” “lighter” “100-900”
字体样式:font-style: normal 斜体:italic 倾斜:oblique
字母变大写:font-variant:small-caps;输入的小写字母变成大写
css之背景相关属性:
背景颜色:background-color:red
背景图片:background-image:url(‘xxx’)
背景重复:background-repeat: (repeat-x repeat-y)等价于repeat
no-repeat
背景位置(横向,纵向):background-position: left top
center center
right bottom
20px 20px
总结:以上背景属性归一 background:#f60 url(‘xxx’)
no-repeat top center
相关文章推荐
- 修改word2010的样式 快捷键
- 跨浏览器兼容css3样式
- DIV+CSS----流式布局和盒子模型
- css:cdata
- 纯CSS3精美登录界面
- CSS中line-height带单位与不带单位,带何种单位的区别
- CSS3中:nth-child()和nth-of-type()的却别
- css3 图片颜色叠加--background-blend-mode
- QT源码剖析之QSS样式表
- CSS 清除浮动的4种方法
- 《CSS权威指南》学习记录——块级元素
- css利用id和class来控制元素样式技巧总结
- 浅谈html/CSS
- 重写alert,confirm 提示框样式
- DOM文档对象模型
- 修改 Input placeholder 的样式
- 《CSS3实战》笔记--选择器(三)
- css 超详细文档
- css实现图片转动
- 修改系统自带默认的输入法,系统自带键盘的样式