Blogger Information
Blog 8
fans 0
comment 0
visits 5017
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
使用伸缩盒标签制作一个首页的二级分类
A正进
Original
446 people have browsed it

使用伸缩盒标签制作一个首页的二级分类

  1. <head>
  2. <meta charset="utf-8">
  3. <title>弹性盒模式二级导航按钮</title>
  4. <style type="text/css">
  5. bodynav,ul{
  6. margin: 0px;
  7. padding: 0px;
  8. }
  9. nav>ul{
  10. display: flex;
  11. background-color: aquamarine;
  12. justify-content: center;
  13. }
  14. li{
  15. list-style: none;
  16. }
  17. a{
  18. text-decoration: none;
  19. }
  20. nav>ul>li{
  21. padding: 10px 20px;
  22. position: relative;
  23. }
  24. nav>ul>li:hover,nav>ul>li>ul>li:hover{
  25. background-color: chocolate;
  26. }
  27. nav>ul>li>ul{
  28. position: absolute;
  29. /* border: 1px solid #D2691E; */
  30. top:40px;
  31. left:0px;
  32. display: none;
  33. }
  34. nav>ul>li>ul>li{
  35. background-color: #7FFFD4;
  36. padding: 10px 20px;
  37. }
  38. nav>ul>li:hover>ul{
  39. display: block;
  40. }
  41. </style>
  42. </head>
  43. <body>
  44. <nav>
  45. <ul>
  46. <li><a href="">首页</a></li>
  47. <li><a href="">公司简介</a></li>
  48. <li><a href="">新闻资讯</a></li>
  49. <li><a href="">产品的介绍</a>
  50. <ul>
  51. <li><a href="">产品介绍一</a></li>
  52. <li><a href="">产品介绍二</a></li>
  53. <li><a href="">产品介绍三</a></li>
  54. <li><a href="">产品介绍四</a></li>
  55. </ul>
  56. </li>
  57. <li><a href="">联系我们</a></li>
  58. </ul>
  59. </nav>
  60. </body>
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:可以适当添加效果图
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post