<html>
<head>
<meta charset="UTF-8">
<title >Css学习</title>
<!-- 此处的style.css已无作用-->
<link rel="stylesheet" href="style.css" />
<style>
*{
margin: 0;
padding: 0;
}
#menu{
min-width: 400px;
height:2rem;
background: yellow;
text-align: center;
line-height: 2rem;
font-size: 1rem;
}
#menu a{
padding: 1rem;
color: chartreuse;
text-decoration: none;
font-weight: bold;
/*以下为标签线属性设置*/
padding-right:5px;
padding-left:5px;
border-right:5px solid gray;
}
#menu a:hover{color: blue}
</style>
</head>
<body >
<div id="menu">
<a href="#">链接A</a>|<!--这根线注意!!,用标签处理器处理过-->
<a href="#">链接A</a>|
<a href="#">链接A</a>|
<a href="#">链接A</a>|
<a href="#">链接A</a>|

</div>

</body>
</html>



01-16 11:39