今天又重新弄了之前未成功的导航页代码的修改,但还是不能够达到要求(这次是图片无法加载出来)代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>导航</title>
   <style type="text/css">
        body{
            background-image: url('C:\Users\35458\Desktop\Sublime Text\image\h_bg.jpg');
            background-repeat: no-repeat;
        }

        div{
            width: 980px;
            height: 150px;
        }

        ul li{
            float: left;
            width: 84px;
            font-weight: bold;
            margin-top: 85px;
            font-size: 10px;
            line-height: 24px;
        }
        ul li:hover{
            font-size: 20px
        }
    </style>
</head>
<body>
  <div>
        <ul>
            <li>
                首页
            </li>
            <li>
                家用电器
            </li>
            <li>
                手机数码
            </li>
            <li>
                日常百货
            </li>
            <li>
                书籍
            </li>
            <li>
                帮助中心
            </li>
            <li>
                免费开店
            </li>
            <li>
                全球咨询
            </li>
        </ul>
    </div>
</body>
</html>

图片的地址是直接复制的,在引用图片地址时单引号和双引号均试过,但都不成功。(真的很无语)

posted on 2022-03-09 18:33  辰逸1  阅读(647)  评论(0编辑  收藏  举报