html里面怎么设定边框?html边框样式设定办法
发布时间:09/01 来源:未知 浏览:
关键词:
CSS Border图像属性用于将图像边框增加到某些元素。您不需要使用任何HTML代码来调取边框图像。边框图像的示例语法如下:.
#borderimg { border: 10px solid transparent; padding: 15px;}
以下是将图像设定为元素边框的示例:
<html> <head> <style> #borderimg1 { border: 10px solid transparent; padding: 15px; border-image-source: url(/css/images/border.png); border-image-repeat: round; border-image-slice: 30; border-image-width: 10px; } #borderimg2 { border: 10px solid transparent; padding: 15px; border-image-source: url(/css/images/border.png); border-image-repeat: round; border-image-slice: 30; border-image-width: 20px; } #borderimg3 { border: 10px solid transparent; padding: 15px; border-image-source: url(/css/images/border.png); border-image-repeat: round; border-image-slice: 30; border-image-width: 30px; } </style> </head> <body> <p id = "borderimg1">php网站是最好的网站</p> <p id = "borderimg2">php网站是最好的网站</p> <p id = "borderimg3">php网站是最好的网站</p> </body></html>
显示结果如下:
本篇文章给大家带来的内容是关于html里面如何设定边框?html边框样式设定办法,有必然的参照 价值,有需要的伴侣可以参照 一下,但愿对你有所帮忙。
以上就是html里面如何设定边框?html边框样式设定办法的具体内容,更多请关注百分百源码网其它相关文章!