div+css简写原则

①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只能通过斜杠/组成一个值,不能分开写。)

②background

简写:

background:#fff url(bg.gif) no-repeat fixed left top;

等效于:

background-color:#fff; background-image:url(bg.gif); background-repeat:no-repeat; background-attachment:fixed; background-position:left top;

顺序:background-color | background-image | background-repeat | background-attachment | background-position

③margin & padding这些涉及四边的都是:

一个值=所有的边框;两个值=顶/底边框,两侧边框;三个值=顶边框,两侧边框,底边框;四个值=遵循钟面原则(上、右、下、左)。

 

转载于:https://www.cnblogs.com/beyourself/archive/2013/03/29/2988978.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值