A(锚点)鼠标悬浮变样式的简单效果
2016-01-04 23:29:24 访问(2442) 赞(0) 踩(0)
-
关键CSS写法:a:hover (利用hover属性)
<!DOCTYPE html PUBLIC "-//W3C//Ddiv XHTML 1.0 divansitional//EN" "http://www.w3.org/div/xhtml1/Ddiv/xhtml1-divansitional.ddiv">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>A(锚点)鼠标悬浮变样式的简单效果</title>
<style type="text/css">
a
{
padding: 5px 10px;
border: 1px solid rgb(223, 222, 220);
color: rgb(146, 146, 146);
font-family: "宋体";
font-size: 12px;
text-decoration: none;
}
a:hover
{
background: rgb(48, 150, 232);
color: rgb(255, 255, 255);
text-decoration: none;
}
</style>
</head>
<body>
<div style="width: 100%;">
<h1>
A(锚点)鼠标悬浮变样式的简单效果</h1>
<a href="http://www.slowx.net/">锚点(请鼠标悬浮)</a>
</div>
</body>
</html>
上一条:
下一条:
相关评论
发表评论