CSS 边框的上下左右

2019-07-19  本文已影响0人  氢金

英语不好的小伙伴记住单词
上:top
下:bottom
左:left
右:right
样式、风格:style

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>边框2学习</title>
        <style type="text/css">
            .box{
                width:200px;
                height:200px;
                /* 绘制完整边框
                border:5px solid blue; */
                /* 绘制上边
                border-top:5px solid red; */
                /* 绘制下边
                border-bottom:5px solid red; */
                /* 绘制左边
                border-left:5px solid red; */
                /* 绘制右边
                border-right:5px solid red; */
                
            }
            
            
        </style>
        
    </head>
    <body>
        <div class="box">哈哈</div>
        
    </body>
</html>

上一篇下一篇

猜你喜欢

热点阅读