效果圖
<html>
<head>
<meta charset="utf-8">
<title></title>
<base target="_blank" />
<style>
a{
color: black;
text-decoration: none;
/*border:solid 1px #000000;*/
/*行內元素轉塊級元素*/
display: block;
width: 100px;
height: 40px;
/*文本對齊*/
text-align: center;
line-height: 40px;
/*改爲左浮動*/
float: left;
/*設置外邊距*/
margin: 10px;
}
/*設置鼠標懸停*/
a:hover{
color: #ffffff;
background-color: #FF0000;
}
</style>
</head>
<body>
<a href="#" class="">首頁</a>
<a href="#" class="">公司簡介</a>
<a href="#" class="">產品中心</a>
<a href="#" class="">人才招聘</a>
<a href="#" class="def">聯繫我們</a>
</body>
</html>