案例图:
案例步骤:
代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>小米商城侧边栏</title>
<style>
a {
width: 200px;
height: 40px;
display: block;
background-color: #55585a;
color: white;
font-size: 14px;
text-decoration: none;
text-indent: 2em;
}
a:hover{
background-color: #ff6700;
}
</style>
</head>
<body>
<a href="#">手机 电话卡</a>
<a href="#">电视 盒子</a>
<a href="#">笔记本 平板电脑</a>
<a href="#">智能 路由器</a>
<a href="#">出行 穿戴</a>
<a href="#">耳机 音响</a>
</body>
</html>
结果如下: