好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

background-clip背景图片做适当的裁剪_html/css_WEB-ITnose

background-clip

用来将背景图片做适当的 裁剪 以适应实际需要。

语法:

background-clip : border-box | padding-box | content-box | no-clip 

参数分别表示从 边框、 或 内填充 ,或者 内容区域 向外裁剪背景。 no-clip 表示不裁切,和 参数border-box 显示同样的效果。backgroud-clip默认值为 border-box 。

效果如下图所示:

      背景裁切  .wrap {    width:220px;     border:20px dashed #000;     padding:20px;     font-weight:bold;     color:#000;     background:#ccc url(http://static.mukewang.com/static/img/logo_index.png) no-repeat;     background-origin: border-box;    background-clip: content-box;    position: relative;}.wrap span {     position: absolute;     left:0;     top:0;}.content {    height:80px;     border:1px solid #333;}      

padding

content

查看更多关于background-clip背景图片做适当的裁剪_html/css_WEB-ITnose的详细内容...

  阅读:29次