CSS3 HTML5实例二(图形化边界)

来源:互联网 发布:python replace 正则 编辑:程序博客网 时间:2024/05/29 15:21

顾名思义,图形化边界就是允许使用图片作为对象的边界,语法如下:

  border: 5px solid #cccccc;

  -webkit-border-image: url(/images/border-image.png) 5 repeat;

  -moz-border-image: url(/images/border-image.png) 5 repeat;

  border-image: url(/images/border-image.png) 5 repeat;

  这里,border: 5px 设定了边界的宽度,然后,每个边界的图片定义告诉浏览器,使用图片的多大一部分来充当边界。边界图片还可以针对每一条边单独设置:

  border-bottom-rightright-image

  border-bottom-image

  border-bottom-left-image

  border-left-image

  border-top-left-image

  border-top-image

  border-top-rightright-image

  border-right-image

  支持的浏览器: Firefox 3.1, Safari , Chrome.