CSS 基础教程-071 CSS设置四个边框的样式

hrs 提交于 2020/02/13 - 16:39 , 周四

实例代码
 

<html>
        <head>
                <meta charset="utf-8">
                <style type="text/css">
                p{
                width:300px;
                padding:5px;
                border-color:red;
                }

                p.solid{border-style:solid;}
                p.double{border-style:double;}
                p.dotted{border-style:dotted;}
                p.dashed{border-style:dashed;}
                p.groove{border-style:groove;}
                p.ridge{border-style:ridge;}
                p.inset{border-style:inset;}
                p.outset{border-style:outset;}

                </style>
        </head>
        <body>
                <h3>输出所有边框样式</h3>
                <p class="solid">solid 实线样式</p>
                <p class="double">double 双实线样式</p>
                <p class="dotted">dotted 点状样式</p>
                <p class="dashed">dashed 虚线样式</p>
                <p class="groove">groove 3D凹槽样式</p>
                <p class="ridge">ridge 3D凸槽样式 </p>
                <p class="inset">inset 3D凹边样式</p>
                <p class="outset">outset 3D凸边样式</p>


        </body>
</html>

运行效果:

css_071.png

标签