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;
        }
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

友情链接更多精彩内容