ASCII码 ASCII码

变色导航条

发布于:2022-05-09 08:54:53  栏目:技术文档

<!DOCTYPE html>

<html lang="en">

<head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>导航条变色</title> <style> ul{ width: 680px; height: 32px; margin: auto; background: rgb(230,0,18); padding-left:1px; } ul>li{ display: block; float: left; font-size: 10px; text-align: center; height: 32px;

  1. }
  2. ul>li>a{
  3. display: block;
  4. color: white;
  5. text-decoration: none;
  6. border-right:1px solid rgb(208,0,16);
  7. padding: 0px 20px 0px 20px;
  8. line-height: 15px;
  9. margin-top: 8px;
  10. }
  11. li:hover{
  12. background: white;
  13. border-top: 1px solid rgb(230,0,18);
  14. }
  15. a:hover{
  16. color: black;
  17. }
  18. </style>

</head>

<body> <ul> <li><a href="#">首页</a></li> <li><a href="#">前沿</a></li> <li><a href="#">前端</a></li> <li><a href="#">后端</a></li> <li><a href="#">云计算</a></li> <li><a href="#">产品设计</a></li> <li><a href="#">关于我们</a></li> </ul></body></html>

相关推荐
阅读 +