常用页面效果 --- 基础效果
1. CSS --- 鼠标点击后背景变色
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
.filter{
margin: 80px 40px;
display: flex;
width: 990px;
padding: 50px 30px;
}
.filter a{
padding: 10px 20px;
margin-right: 20px;
background: #f5f5f5;
color: #666;
text-decoration: none;
}
a {
text-decoration: none;
color: #666;
}
a:hover {
color:#DD302D;
text-decoration: none;
}
/* CSS 控制鼠标点击后背景变色 */
.filter a:active,
.filter a:focus {
background: #05943c;
color: #fff;
}
</style>
</head>
<body>
<div class="box">
<div class="filter">
<a href="javascript:">0-100元</a>
<a href="#">100-300元</a>
<a href="#">300元以上</a>
<a href="#">全部区间</a>
</div>
</div>
<script>
</script>
</body>
</html>
python防脱发技巧

浙公网安备 33010602011771号