前端開發練習:快報模組

APythonC發表於2020-11-05

效果圖如下:

在這裡插入圖片描述
程式碼如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>快報模組</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .kuaibao {
            width: 310px;
            height: 205px;
            border: 1px solid #d1d1d1;
            margin: 200px auto;

        }

        .tou {
            margin-top: 12px;
            padding: 0 19px;
        }

        .xuxian {
            margin-top: 13px;
            border-bottom: 1px dashed #d1d1d1;
        }

        .diyi {
            margin-top: 17px;
            padding: 0 25px;
            color: black;
            text-decoration: none;
            display: inline-block;
            font-size: 14px;
        }

        .hang {
            margin-top: 6px;
            padding: 0 25px;
            color: black;
            text-decoration: none;
            display: inline-block;
            font-size: 14px;
        }

        div a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
<div class="kuaibao">
    <div class="tou">品優購快報</div>
    <div class="xuxian"></div>
    <div><a href="#" class="diyi">【特惠】爆款耳機五折秒!</a></div>
    <div><a href="#" class="hang">【特惠】母親節,健康好禮低至五折!</a></div>
    <div><a href="#" class="hang">【特惠】爆款耳機五折秒!</a></div>
    <div><a href="#" class="hang">【特惠】9.9元洗100張照片!</a></div>
    <div><a href="#" class="hang">【特惠】長虹智慧空調立省1000!</a></div>
</div>
</body>
</html>

相關文章