https://www.bilibili.com/video/BV14J4114768?p=499

响应式开发

image.png

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>响应式导航</title>
  5. <style>
  6. * {
  7. margin: 0;
  8. padding: 0;
  9. }
  10. ul {
  11. list-style: none;
  12. }
  13. .container {
  14. width: 750px;
  15. margin: 0 auto;
  16. }
  17. .container ul li {
  18. float: left;
  19. width: 93.75px;
  20. height: 30px;
  21. background-color: green;
  22. }
  23. @media screen and (max-width: 767px) {
  24. .container {
  25. width: 100%;
  26. }
  27. .container ul li {
  28. width: 33.33%;
  29. }
  30. }
  31. </style>
  32. </head>
  33. <body>
  34. <div class="container">
  35. <ul>
  36. <li>导航栏</li>
  37. <li>导航栏</li>
  38. <li>导航栏</li>
  39. <li>导航栏</li>
  40. <li>导航栏</li>
  41. <li>导航栏</li>
  42. <li>导航栏</li>
  43. <li>导航栏</li>
  44. </ul>
  45. </div>
  46. </body>
  47. </html>

Bootstrap框架

中文官网:https://www.bootcss.com/
官网:https://getbootstrap.com/

Bootstrap栅格系统

布局容器

image.png

栅格系统

image.png
image.png