You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
1.4 KiB

2 years ago
  1. * {
  2. margin: 0;
  3. padding: 0;
  4. }
  5. html {
  6. font-size: 10px;
  7. }
  8. #top, #main, #bottom {
  9. width: 100%;
  10. }
  11. #top {
  12. position: fixed; /* 固定位置 */
  13. top: 0;
  14. left: 0;
  15. right: 0;
  16. height: 2rem;
  17. z-index: 1000;
  18. background-color: #f5f5f5;
  19. }
  20. #logo {
  21. width: 4rem;
  22. height: 1rem;
  23. vertical-align: -webkit-baseline-middle; /* 垂直居中 */
  24. }
  25. #main {
  26. height: auto; /* 高度设置为自动 */
  27. position: absolute;
  28. top: 2rem;
  29. border: 2rem;
  30. background-color: #f5f5f5;
  31. }
  32. #main ul {
  33. display: flex;
  34. /* 主轴方向为纵轴 */
  35. flex-direction: column;
  36. /* 两端对齐 */
  37. justify-content: space-between;
  38. font-size: 0.5rem;
  39. }
  40. .shopCar {
  41. width: 1rem;
  42. height: 1rem;
  43. vertical-align: -webkit-baseline-middle;
  44. }
  45. .logo {
  46. width: 3.6rem;
  47. height: 2rem;
  48. vertical-align: -webkit-baseline-middle;
  49. }
  50. #main ul li {
  51. flex: 1 1 3rem;
  52. display: flex;
  53. border-bottom: 1px solid black;
  54. align-items: center;
  55. }
  56. #main ul li div {
  57. margin-left: 0.2rem;
  58. margin-right: 0.5rem;
  59. }
  60. #bottom {
  61. position: fixed; /* 固定位置 */
  62. bottom: 0;
  63. left: 0;
  64. right: 0;
  65. height: 2rem;
  66. z-index: 1000;
  67. background-color: #f5f5f5;
  68. display: flex;
  69. }
  70. #bottom div {
  71. flex: 1 1 auto;
  72. text-align: center;
  73. }
  74. #bottom div img {
  75. width: 1.5rem;
  76. width: 1.5rem;
  77. vertical-align: -webkit-baseline-middle;
  78. }