今天将和大家分享css3中边框属性的用法,具有一定的参考价值,希望对大家有所帮助。
CSS3中的边框增加了许多新的功能,使我们的边框设计变得更加好看,接下来将在文中详细的为大家介绍几种边框的用法
css3边框
(1)边框阴影
box-shadow:h-shadow v-shadow blur spread color inset
h-shadow ,v-shadow:水平和垂直方向的阴影位置,可以写负值
blur :模糊距离(值越大越模糊)。
spread:阴影的尺寸
color :阴影的颜色
inset:将外部阴影 (outset) 改为内部阴影
前面两个值是必选的,后面四个值是可选的
div{ width:100px; height: 100px; background-color: pink; box-shadow:10px 10px 10px gray; }
(2)边框图片
border-image:src slice width outset repeat
src : 图片的路径。
slice:图片边框向内偏移。
width:图片边框的宽度。
outset:边框图像区域超出边框的量。
repeat:图像边框是否应平铺(repeated)、铺满(rounded)或拉伸(stretched)
注意浏览器兼容问题
div{ border:20px solid transparent; width:100px; height:50px; line-height: 50px; text-align: center; padding:10px 20px; border-image:url(images/12.png) 50 50 round; -moz-border-image:url(images/12.png) 50 50 round; /* Firefox */ -webkit-border-image:url(images/12.jpg) 50 50 round; /* Safari 和 Chrome */ -o-border-image:url(images/12.png) 50 50 round; /* Opera */ }
(3)边框圆角
border-radius
div{ width:150px; height:30px; border:2px solid #ccc; border-radius:25px; line-height: 30px; text-align: center; }
总结:以上就是本篇文章的全部内容了。希望对大家有所帮助。
以上是CSS3中边框属性如何使用的详细内容。更多信息请关注PHP中文网其他相关文章!

Wufoo一直在集成方面非常出色。他们与特定应用程序(例如广告系列显示器,MailChimp和Typekit)进行集成,但他们也


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

SublimeText3 Linux新版
SublimeText3 Linux最新版

EditPlus 中文破解版
体积小,语法高亮,不支持代码提示功能

PhpStorm Mac 版本
最新(2018.2.1 )专业的PHP集成开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

记事本++7.3.1
好用且免费的代码编辑器