- HTML中文网
- 联系QQ:88526
- QQ交流群

- 微信公众号

border-left-width属性
含义:
border-left-width 属性用于设置元素的左边框的宽度
注意:只有当边框样式不是 none 时才起作用,如果边框样式是 none,边框宽度实际上会重置为 0。不允许指定负长度值
在 border-left-width 属性之前声明 border-style 属性,元素只有在获得边框之后,才能改变其边框的宽度
浏览器支持:
属性 | ![]() | ![]() | ![]() | ![]() | ![]() |
---|---|---|---|---|---|
border-left-width | 4.0 | 1.0 | 1.0 | 1.0 | 3.5 |
CSS语法:
border-left-width:thin|medium|thick|length|inherit
属性值:
值 | 描述 |
thin | 定义细的左边框 |
medium | 默认值。定义中等的左边框 |
thick | 定义粗的左边框 |
length | 自定义左边框的宽度 |
inherit | 规定应该从父元素继承边框宽度 |
p{ width:100px; height: 100px; line-height: 100px; text-align: center; border:1px solid #ccc; border-left:15px groove #ED28BB; border-left-width:thick; }
点击 "运行实例" 按钮查看在线实例
效果图:
推荐手册