css的一些基本屬性

注意:行內標簽寬高默認是以內容決定的,無法更改。但是標簽添加浮動以后,可以更改寬高

        *{
            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;
        }
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容