<!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>
</head>
<style>
/* 1 把a转换为块元素 */
a{
display: block;
widows: 230px;
height: 40px;
background-color: #55585a;
font-size: 14px;
color: #fff;
text-decoration: none;
text-indent: 2em;
}
/* 鼠标经过链接变换背景颜色 */
a:hover{
background-color: rgb(191, 245, 227);
}
</style>
<body>
</body>
<a href="#">手机电话卡</a>
<a href="#">电视盒子</a>
<a href="#">笔记本 平板</a>
<a href="#">出行 穿戴</a>
<a href="#">智能 路由器</a>
<a href="#">健康 儿童</a>
<a href="#">耳机 音响 </a>
</html>
前端HTML鼠标经过链接变换背景颜色
猜你喜欢
转载自blog.csdn.net/qq_55061257/article/details/118970730
今日推荐
周排行