css3总结

1. box-sizing:  content-box||border-box;

content-box 传统模式W3C标准,width就是内容宽度

border-box  ie标准 width是内容+内边距(padding)+border

往往用在布局中,如果布局有padding或者border,导致原本100%宽度的并排元素出现问题,可以使用border-box来尝试布局。


2.text-overflow:clip||ellipsis

clip截断:配合overflow:hidden使用

ellipsis:末尾是“...”,配合overflow:hidden;white-space:nowrap一起使用

ellipsis在firefox上可能很有问题


3.border-image谨慎使用,因为我发现浏览器对其处理可能会和background混淆。情愿平铺了。反正以后我不用了。


4.@font-face: 字体详细介绍:http://www.w3cplus.com/content/css3-font-face


5.::selection:选中时候的样式

6.各种字体效果:http://www.w3cplus.com/blog/tags/11.html?page=9

7.media query:主要用来响应式布局

css中添加

@media screen and (max-width: 600px) {
    选择器 {
      属性:属性值;
    }
  }


link中添加

 <link href="css/reset.css" rel="stylesheet" type="text/css" media="screen" />
  <link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
  <link href="css/print.css" rel="stylesheet" type="text/css" media="print" />


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值