index.wxss 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. .tab-bar {
  2. position: fixed;
  3. bottom: 0;
  4. left: 0;
  5. right: 0;
  6. height: 60px;
  7. background: white;
  8. display: flex;
  9. padding-bottom: env(safe-area-inset-bottom);
  10. border-radius: 20px 20px 0 0;
  11. box-shadow: 0px 8px 20px 0px rgba(0,0,0,.5);
  12. z-index: 0;
  13. }
  14. .tab-bar-border {
  15. background-color: rgba(0, 0, 0, 0.33);
  16. position: absolute;
  17. left: 0;
  18. top: 0;
  19. width: 100%;
  20. height: 1px;
  21. transform: scaleY(0.5);
  22. }
  23. .tab-bar-item {
  24. flex: 1;
  25. text-align: center;
  26. display: flex;
  27. justify-content: center;
  28. align-items: center;
  29. flex-direction: column;
  30. position: relative;
  31. }
  32. .tab-bar-item.center {
  33. margin-top: -20px;
  34. }
  35. .tab-bar-item.center image {
  36. width: 56px;
  37. height: 56px;
  38. z-index: 3;
  39. border-radius: 50%;
  40. }
  41. .tab-bar-item.center::before {
  42. content: '';
  43. width: 64px;
  44. height: 32px;
  45. position: absolute;
  46. left: 50%;
  47. top: 0;
  48. transform: translate(-50%, 0px);
  49. background: #FFF;
  50. border-radius: 180px 180px 0 0 ;
  51. box-shadow: 0px 8px 20px 0px rgba(0,0,0,.5);
  52. /* clip-path: inset(0 0 66.66% 0); 裁剪三分之一高度 */
  53. }
  54. .tab-bar-item.center::after {
  55. content: '';
  56. width: 100px;
  57. height: 40px;
  58. position: absolute;
  59. left: 50%;
  60. top: 20px;
  61. background: #FFF;
  62. transform: translate(-50%, 0px);
  63. }
  64. .tab-bar-item image {
  65. width: 27px;
  66. height: 27px;
  67. }
  68. .tab-bar-item view {
  69. font-size: 12px;
  70. }