美文网首页
css的一些基本属性

css的一些基本属性

作者: 动感超人丶 | 来源:发表于2017-08-21 10:52 被阅读7次

    注意:行内标签宽高默认是以内容决定的,无法更改。但是标签添加浮动以后,可以更改宽高

            *{
                margin: 0;
                padding: 0;
            }
    
            /*背景图平铺、位置*/
            .back{
                width: 1000px;
                height: 500px;
                background-color: red;
                background-image: url("ti.jpg");
                background-repeat: no-repeat;
                background-position: center top;
                background-position: 10px 10px;
            }
            /*body添加背景图*/
            body{
                background-image: url("ti.jpg");
                background-attachment: fixed;
                background-repeat: no-repeat;
            }
            /*列表前面标*/
            ul{
                list-style-type: none;
                list-style-image: url("ti.jpg");
            }
            /*表格合并线*/
            table{
                border: 1px solid blue;
                border-collapse: collapse;
            }
    
            td{
                border: 1px solid orange;
            }
    
            .news{
    
                width: 300px;
                height: auto;
                border: 1px solid red;
                margin: auto;
            }
    
            .news h1{
    
                height: 48px;
                background-color: #e6e6e6;
                font-size: 16px;
                color: #0066ff;
                line-height: 48px;
            }
            .news ul{
                list-style-type: none;
            }
    
            .news li{
                padding-left: 10px;
                line-height: 40px;
                border-bottom: 1px dashed darkgrey;
            }
    

    相关文章

      网友评论

          本文标题:css的一些基本属性

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