![](https://box.kancloud.cn/449e8c86b4373ed2e2da086111b14ce4_1351x69.png) 代码 ~~~ <head> <title></title> </head> <style type="text/css"> div.nav{ height: 60px; background-color: #aaa; text-align: center; } a{ display: inline-block; width: 80px; height: 60px; /**去掉下划线**/ text-decoration:none; color: red; } /**鼠标经过的样式**/ a:hover{ background-color: yellow; color: black; } </style> <body> <div class='nav'> <a href="#">标题一</a> <a href="#">标题二</a> <a href="#">标题三</a> <a href="#">标题四</a> </div> </body> </html> ~~~