<html> <head> <style type="text/css"> p.one { border-style: solid; border-left-width: 15px } p.two { border-style: solid; border-left-width: thin } </style> </head> <body> <p class="one"><b>注释:</b>"border-left-width" 属性如果单独使用的话是不会起作用的。请首先使用 "border-style" 属性来设置边框。</p> <p class="two">Some text. Some more text.</p> </body> </html>
本文案例为大家展示了《如何设置左边框的宽度》的代码,若要看代码效果请大家点击“运行代码”按钮。
[code]<html> <head> <style type=”text/css”> p.one { border-style: solid; border-left-width: 15px } p.two { border-style: solid; border-left-width: thin } </style> </head> <body> <p class=”one”><b>注释:</b>”border-left-width” 属性如果单独使用的话是不会起作用的。请首先使用 “border-style” 属性来设置边框。</p> <p class=”two”>Some text. Some more text.</p> </body> </html>[/code]