<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<style>
*{
margin:0 ;
padding: 0;
}
div{
1000px;
height: 60px;
}
ul{
list-style: none;
}
li{
float: left;
80px;
height: 20px;
background:blue;
text-align: center;
white-space: nowrap;
overflow: hidden;
}
li:hover a{
display: none;
}
li:hover span{
overflow: visible;
}
a{ display: block;
text-decoration: none;
}
</style>
<body>
<div>
<ul>
<li><a href="">home</a><span>首页</span></li>
<li><a href="">blog</a><span>首页</span></li>
<li><a href="">guestbook</a><span>首页</span></li>
<li><a href="">pickbar</a><span>首页</span></li>
<li><a href="">fansir</a><span>首页</span></li>
</ul>
</div>
</body>
</html>
复制粘贴即可实现,笔者不多说。喜欢上干货。注 a和span是同级标签。