css回归之用户界面

1.box-sizing:

  • content-box:顾名思义  我们设置width height 只包括content

    here is the math:

    width=200px=content_width;

  • border-box:同理 我们设置的宽高 包括content+padding+border

  here is the math:

  width=200px=content_width+padding_width+border_box(include left and right )

看codepen我的实验:

http://codepen.io/anon/pen/JYLOrd?editors=110

<后话:谁知道博客园 要怎么内嵌框架啊 我用iframe不行啊!>

 

posted @ 2015-10-26 13:02  belongcai  阅读(137)  评论(0编辑  收藏  举报