«

CSS 常用樣式

Paladin 发布于 阅读:84 oTher


<style>
        #body居中
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            font-size: 25px;

        }
        #class 樣式居中
        .slide {
            text-align: center;
            position: relative;

        }
        #class 水印
        .slide::after {
            content: "水印內容";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            opacity: 0.1;
            font-size: 88px;
            color: #999;
            z-index: -1;
        }
        #表格靠左顯示
        table {
            width: 100%;
            border-collapse: collapse;
        }

        th,
        td {
            padding: 8px;
            text-align: left;
            /* border-bottom: 1px solid #ddd; */
        }
        div {
            width: 90%; 
            margin: 0 auto;
        }

    </style>

HTML