039.列表样式的练习(模仿京东商城列表)


DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>2021-12-6title>
        <link rel="stylesheet" type="text/css" href="../css/列表的样式.css"/>
    head>
    <body>
     <div id="nav">
         <h2 class="title">全部商品分类h2>
         <ul>
             <li>
                 <a href="#">图书a>
                 <a href="#">音像a>
                 <a href="#">数字商品a>
             li>
             <li>
                 <a href="#">家用电器a>
                 <a href="#">手机a>
                 <a href="#">数码a>
             li>
             <li>
                 <a href="#">电脑a>
                 <a href="#">办公a>
             li>
             <li>
                 <a href="#">家居a>
                 <a href="#">家装a>
                 <a href="#">厨具a>
             li>
             <li>
                 <a href="#">服饰鞋帽a>
                 <a href="#">个性化妆a>
             li>
             <li>
                 <a href="#">礼品箱包a>
                 <a href="#">钟表a>
                 <a href="#">珠宝a>
             li>
             <li>
                 <a href="#">食品饮料a>
                 <a href="#">保健食品a>
             li>
             <li>
                 <a href="#">彩票a>
                 <a href="#">旅行a>
                 <a href="#">充值a>
                 <a href="#">票务a>
             li>
         ul>
     div>
     body>
html>
#nav{
    width: 300px;
    background:  #a0a0a0;
}
.title{
    font-size: 18px;
    font-weight: bold;
    text-indent: 1em;
    line-height: 60px;
    background: red;
}
/*
list-style:
 none;去掉圆点
 cricle 空心圆
 decimal 数字
 square 正方形

*/
ul li{
    height: 30px;
    list-style: none;
    text-indent: 1em;
}
a{
    text-decoration: none;
    font-size: 14px;
    color: #000000;
}
a:hover{
    color: orange;
    text-decoration: underline;
}
CSS