<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="css/123.css"/>
</head>
<body>
<a href="http://www.taobao.com" title="this is baidu" >登 录</a>
</body>
</html>
*{
margin: 0px;
padding: 0px;
}
a{
position: absolute;
display: block;
margin-top:-15px ;
margin-left:-100px ;
left: 50%;
top: 50%;
height: 30px;
width: 200px;
border: black 2px solid;
text-align: center;
line-height: 30px;
cursor:pointer;
background-color: red;
color: green;
text-decoration: none;
font-size: 14px;
}
a:hover{/* 当鼠标悬浮在元素上方时,向元素添加样式 */
text-decoration: underline;
color: bisque;
}
a:link{/* 未被访问的链接 */
background-color: black;
}
a:visited{/* 已访问的链接 */
background-color: yellow;
}
a:active{/* 向被激活(鼠标持续点击时)的元素添加样式,*/
background-color: red;
}
效果: