1、京东左侧分类导航
.container{
width:220px;
height: 620px;
border:1px solid gray;
}
.cate_menu {
margin:10px auto;
list-style: none;
}
.cate_menu li{
font-size: 14px;
height:25px;
line-height: 25px;
}
.cate_menu li a {
text-decoration: none;
color: #000;
}
.cate_menu li:hover{
background-color: gray;
color:red;
}
.cate_menu li a:hover {
text-decoration: none;
color: red;
}
</style>
<body>
<div class="container">
<ul class="cate_menu">
<li>
<a href="#">家用电器</a>
</li>
<li>
<a href="#">手机</a>
<span>/</span>
<a href="#">运营商</a>
<span>/</span>
<a href="#">数码</a>
</li>
<li>
<a href="#">电脑</a>
<span>/</span>
<a href="#">办公</a>
</li>
<li>
<a href="#">家居</a>
<span>/</span>
<a href="#">家具</a>
<span>/</span>
<a href="#">家装</a>
<span>/</span>
<a href="#">厨具</a>
</li>
<li>
<a href="#">男装</a>
<span class="cate_menu_line">/</span>
<a href="#">女装</a>
<span class="cate_menu_line">/</span>
<a href="#">童装</a>
<span class="cate_menu_line">/</span>
<a href="#">内衣</a>
</li>
<li>
<a href="#">美妆</a>
<span class="cate_menu_line">/</span>
<a href="#">个护清洁</a>
<span class="cate_menu_line">/</span>
<a href="#">宠物</a>
</li>
<li>
<a href="#">女鞋</a>
<span class="cate_menu_line">/</span>
<a href="#">箱包</a>
<span class="cate_menu_line">/</span>
<a href="#">钟表</a>
<span class="cate_menu_line">/</span>
<a href="#">珠宝</a>
</li>
<li>
<a href="#">男鞋</a>
<span class="cate_menu_line">/</span>
<a href="#">运动</a>
<span class="cate_menu_line">/</span>
<a href="#">户外</a>
</li>
<li>
<a href="#">房产</a>
<span class="cate_menu_line">/</span>
<a href="#">汽车</a>
<span class="cate_menu_line">/</span>
<a href="#">汽车用品</a>
</li>
<li>
<a href="#">母婴</a>
<span class="cate_menu_line">/</span>
<a href="#">玩具乐器</a>
</li>
<li>
<a href="#">食品</a>
<span class="cate_menu_line">/</span>
<a href="#">酒类</a>
<span class="cate_menu_line">/</span>
<a href="#">生鲜</a>
<span class="cate_menu_line">/</span>
<a href="#">特产</a>
</li>
<li>
<a href="#">艺术</a>
<span class="cate_menu_line">/</span>
<a href="#">礼品鲜花</a>
<span class="cate_menu_line">/</span>
<a href="#">农资绿植</a>
</li>
<li>
<a href="#">医药保健</a>
<span class="cate_menu_line">/</span>
<a href="#">计生情趣</a>
</li>
<li>
<a href="#">图书</a>
<span class="cate_menu_line">/</span>
<a href="#">文娱</a>
<span class="cate_menu_line">/</span>
<a href="#">教育</a>
<span class="cate_menu_line">/</span>
<a href="#">电子书</a>
</li>
<li>
<a href="#">机票</a>
<span class="cate_menu_line">/</span>
<a href="#">酒店</a>
<span class="cate_menu_line">/</span>
<a href="#">旅游</a>
<span class="cate_menu_line">/</span>
<a href="#">生活</a>
</li>
<li>
<a href="#">理财</a>
<span class="cate_menu_line">/</span>
<a href="#">众筹</a>
<span class="cate_menu_line">/</span>
<a href="#">白条</a>
<span class="cate_menu_line">/</span>
<a href="#">保险</a>
</li>
<li>
<a href="#">安装</a>
<span>/</span>
<a href="#">维修</a>
<span>/</span>
<a href="#">清洗</a>
<span>/</span>
<a href="#">二手</a>
</li>
<li>
<a href="#">工业品</a>
</li>
</ul>
</div>
</body>
</html>
2、数字九宫格
div{
width:101px;
height: 101px;
background-image: url("images/grid.jpg");
}
.one{
float:left;
background-position: -10px,-10px;
}
.two{
float:left;
background-position: -121px,-10px;
}
.three{
float:left;
background-position: -232px,-10px;
}
.four{
position: absolute;
background-position: -343px,-10px;
top:108px;
left:10px;
}
.five{
position: absolute;
background-position: -454px,-10px;
top:108px;
left:111px;
}
.six{
position: absolute;
background-position: -565px,-10px;
top:108px;
left:210px;
}
.seven{
position: absolute;
background-position: -676px,-10px;
top:208px;
left:10px;
}
.eight{
position: absolute;
background-position: -787px,-10px;
top:208px;
left:108px;
}
.nine{
position: absolute;
background-position: -898px,-10px;
top:208px;
left:212px;
}
<body>
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
<div class="four"></div>
<div class="five"></div>
<div class="six"></div>
<div class="seven"></div>
<div class="eight"></div>
<div class="nine"></div>
</body>
3、学习猿地ul列表,主要考察ul的list-style-type可以用url来代替
.container{
width:520px;
height:400px;
margin:0 auto;
}
h1 {
text-align: center;
color: deeppink;
}
.container ul{
list-style: inside url("images/aaaa.png");
}
.container ul li:first-child{
border-top: 2px solid #000;
}
.container ul li:not(li:nth-last-of-type(1)) {
padding-top:15px;
padding-bottom: 10px;
color: deeppink;
border-bottom: 1px solid darkgray;
}
.container ul li:nth-last-of-type(1){
padding-top:10px;
color: deeppink;
}
.container ul li a{
color:deeppink;
text-decoration: none;
}
<body>
<div class="container">
<h1>学习猿地</h1>
<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>
</ul>
</div>
</body>
相关推荐
© 2020 asciim码
人生就是一场修行