美文网首页
CSS 边框的上下左右

CSS 边框的上下左右

作者: 氢金 | 来源:发表于2019-07-19 15:36 被阅读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>
    
    

    相关文章

      网友评论

          本文标题:CSS 边框的上下左右

          本文链接:https://www.haomeiwen.com/subject/wxpdkctx.html