练习:三个基础练习
网站左侧导航栏练习
代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=lia, initial-scale=1.0">
<title>picture</title>
<link rel="stylesheet" href="css/reset.css">
<style>
body{
background-color: pink;
}
.left-nav{
background-color: #ffe;
width: 190px;
height: 450px;
padding: 10px 0;
margin: 50px auto;
}
.left-nav .item{
height: 25px;
line-height: 25px;
padding-left: 18px;
font-size: 12px;
}
.item:hover{
background-color: antiquewhite;
}
.item a:hover{
color: brown;
}
.item a{
font-size: 14px;
color: #222;
text-decoration: none;
}
</style>
</head>
<body>
<nav class="left-nav">
<div class="item">
<a href="">家用电器</a>
</div>
<div class="item">
<a href="">手机</a>/<a href="