css3简写
2015-10-19 11:08
525 查看
1、font的简写:font:italic small-caps bold 12px/1.5em arial,verdana 等效于: font-style:italic;font-variant:small-caps;font-weight:bold;font-size:12px;line-height:1.5em;font-family:arial,verdana; 顺序: font-style| font-variant| font-weight | font-size| line-height| font-family 注意:简写的时候,font-size 与 line-height 必须要通过斜杠/来组成一个词,不容分割 2、 background的简写:background:#fff url('images/bg.png') no-repeat fixed left top; 等效于:background-color:#fff;background-image:url('images/bg.png');background-attachment:fixed;background-position:left top; 顺序:background-color| background-image| background-repeat| background-attachment| background-position 3、margin 和 padding(它们的用法相同,我以margin来说明) margin的简写:margin:1px 2em -23px; 等效于:margin-top:1px;margin-right:0px;margin-bottom:2em;margin-left:-23px; 顺序:margin-top| margin-right| margin-bottom| margin-left 4、 border(这是四个边框的样式)的简写:border:1px solid #000; 等效于:border-width:1px;border-style:solid;border-color:#000; 顺序:border-width| border-style| border-color border又分为:border-top| border-right| border-bottom| border-left(上、右、下、左) border-top:1px solid #000; 等效于:border-top-width:1px;border-top-style:1px;border-top-color:#000; 5、list-style 的简写:list-style:square outside url("images/bullet.gif"); 等效于:lsit-style-type:square;list-style-position:outside;list-style-image:url('imags/bullet.gif'); 顺序:list-style-type| list-style-posiiton| list-style-image
相关文章推荐
- CSS属性选择器
- css实现下拉列表
- CSS中伪类的使用
- CSS3动画
- CSS选择符详解之关系选择符篇
- css垂直居中
- css选择器问题
- block transform box-shadow
- CSS 多行文本换行,溢出部分省略号
- 复习CSS
- CSS3之选择器
- js+css制作悬浮提示层弹出特效
- HTML/CSS(六) typeof
- css标签
- 如何访问到静态的文件,如jpg,js,css?
- jsp、css文件一直红线警告- javax.servlet.jsp cannot be resolved 的解决办法
- CSS常用清除浮动方法总结
- CSS一些小总结——个人向
- .使用 HTML+CSS 实现如图布局,border-widht 5px,一个格子大小是 50*50,hover时候边框变为红色(兼容IE6+,考虑语义化的结构)
- CSS3动画