HTML第6章简答题4(商品分类列表页面)

代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>制作商品分类列表页面</title>
    <style>
        * {
            padding: 0px;
            margin: 0px;
        }

        div {
            border-radius: 10px;
            border: 2px orange solid;
            width: 240px;
            margin: 9px;
        }

        ul {
            margin: 7px 4px 2px 4px;
            padding: 0px;
        }

        li {
            list-style: none;
            padding-left: 54px;
            line-height: 48px;
            border-bottom: dashed 1px darkgrey;
        }

        li:nth-child(1) {
            background: url("../img/icon_01.jpg") no-repeat;
        }

        li:nth-child(2) {
            background: url("../img/icon_02.jpg") no-repeat;
        }

        li:nth-child(3) {
            background: url("../img/icon_03.jpg") no-repeat;
        }

        li:nth-child(4) {
            background: url("../img/icon_04.jpg") no-repeat;
        }

        li:nth-child(5) {
            background: url("../img/icon_05.jpg") no-repeat;
        }

        li:nth-child(6) {
            background: url("../img/icon_06.jpg") no-repeat;
        }

        li:nth-child(7) {
            background: url("../img/icon_07.jpg") no-repeat;
        }

        li:nth-child(8) {
            background: url("../img/icon_08.jpg") no-repeat;
        }

        li:nth-child(9) {
            background: url("../img/icon_09.jpg") no-repeat;
        }

        li:nth-child(10) {
            background: url("../img/icon_10.jpg") no-repeat;
            border: none;
        }
        a{
            color: black;
            font-weight: bold;
        }
        a:hover{
            text-decoration: none;
            color: red;
        }
    </style>
</head>
<body>
<div>
    <ul>
        <li><a href=""> 酒水、饮料</a></li>
        <li><a href="">进口食品</a></li>
        <li><a href="">休闲零食</a></li>
        <li><a href="">地方特产</a></li>
        <li><a href="">保健、冲调</a></li>
        <li><a href="">粮油、生鲜</a></li>
        <li><a href="">美容洗护</a></li>
        <li><a href="">清洁洗涤</a></li>
        <li><a href="">母婴、纸品</a></li>
        <li><a href="">家居百货</a></li>
    </ul>
</div>
</body>
</html>

效果图如下:
在这里插入图片描述
鼠标移入文字后的效果图:
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

思卿不见

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值