css border-bottom-style属性怎么用

青灯夜游
青灯夜游 原创
2019-05-30 14:59:25 2910浏览

css border-bottom-style属性用于设置元素底部边框样式,只有当属性值不是 none 时边框才可能出现。

css border-bottom-style属性怎么用?

border-bottom-style属性设置元素下边框的样式。

可以设置的属性值:

● none:指定无边框

● hidden:与"none" 相同。不过应用于表时除外,对于表,hidden 用于解决边框冲突。

● dotted:指定点状边框。

● dashed:指定虚线边框。

● solid:指定实线边框。

● double:指定一个双边框。

● groove:定义双线。双线的宽度等于 border-width 的值。

● ridge:定义三维菱形边框。其效果取决于 border-color 的值。

● inset:定义三维凹边框。其效果取决于 border-color 的值。

● outset:定义三维凸边框。其效果取决于 border-color 的值。

● inherit:指定应该从父元素继承边框样式。

说明:只有当属性值不是 none 时边框才可能出现。在 CSS1 中,HTML 用户代理只需支持 solid 和 none。

注释:任何的版本的 Internet Explorer (包括 IE8)都不支持属性值 "inherit" 或 "hidden"。

css border-bottom-style属性 示例

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<style>
p.none {border-bottom-style:none;}
p.dotted {border-bottom-style:dotted;}
p.dashed {border-bottom-style:dashed;}
p.solid {border-bottom-style:solid;}
p.double {border-bottom-style:double;}
p.groove {border-bottom-style:groove;}
p.ridge {border-bottom-style:ridge;}
p.inset {border-bottom-style:inset;}
p.outset {border-bottom-style:outset;}
</style>
</head>
<body>
<p class="none">无下边框</p>
<p class="dotted">点下边框</p>
<p class="dashed">虚线下边框</p>
<p class="solid">实线下边框</p>
<p class="double">双线下边框</p>
<p class="groove">凹槽下边框</p>
<p class="ridge">垄状下边框</p>
<p class="inset">嵌入下边框</p>
<p class="outset">外凸下边框</p>
</body>
</html>

效果图:

1.jpg

以上就是css border-bottom-style属性怎么用的详细内容,更多请关注php中文网其它相关文章!

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。