一,效果图。
二,代码。
<!doctype html> <html> <head> <meta charset="utf-8"> <title>css border(边框)</title> <style> p.one { border-style: solid; border-width: 5px; border-color: red; border-top-style: dotted; border-right-style: solid; border-bottom-style: dotted; border-left-style: solid; } p.two { border-style: solid; border-width: medium; border-color: #98bf21; } p.three { border-style: solid; border-width: 1px; } </style> </head> <body> <p class="one">some text.</p> <p class="two">some text.</p> <p class="three">some text.</p> <p><b>note:</b> the "border-width" property does not work if it is used alone. use the "border-style" property to set the borders first.</p> </body> </html>
参考资料:《菜鸟教程》
如对本文有疑问, 点击进行留言回复!!
荐 微信小程序动态评分展示/五角星展示/半颗星展示/自定义长度展示
深入理解CSS background-blend-mode的作用机制
网友评论