navbar.wxss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. .t-float-left {
  2. float: left;
  3. }
  4. .t-float-right {
  5. float: right;
  6. }
  7. @keyframes tdesign-fade-out {
  8. from {
  9. opacity: 1;
  10. }
  11. to {
  12. opacity: 0;
  13. }
  14. }
  15. .hotspot-expanded.relative {
  16. position: relative;
  17. }
  18. .hotspot-expanded::after {
  19. content: '';
  20. display: block;
  21. position: absolute;
  22. left: 0;
  23. top: 0;
  24. right: 0;
  25. bottom: 0;
  26. transform: scale(1.5);
  27. }
  28. .t-navbar {
  29. --navbar-height: 44px;
  30. --navbar-right: 190rpx;
  31. --narbar-padding-top: 20px;
  32. --capsule-wight: 174rpx;
  33. overflow: hidden;
  34. }
  35. .t-navbar--fixed .t-navbar__content {
  36. position: fixed;
  37. top: 0;
  38. left: 0;
  39. z-index: 5001;
  40. }
  41. .t-navbar--visible {
  42. display: '';
  43. }
  44. .t-navbar--visible-animation {
  45. opacity: 1;
  46. transition: opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  47. }
  48. .t-navbar--hide-animation {
  49. opacity: 0;
  50. transition: opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  51. }
  52. .t-navbar--hide {
  53. display: none;
  54. }
  55. .t-navbar__placeholder {
  56. height: var(--navbar-height);
  57. padding-top: var(--narbar-padding-top);
  58. position: relative;
  59. visibility: hidden;
  60. }
  61. .t-navbar__content {
  62. position: relative;
  63. z-index: 1;
  64. height: var(--navbar-height);
  65. width: calc(100% - var(--navbar-right));
  66. padding-right: var(--navbar-right);
  67. padding-top: var(--narbar-padding-top);
  68. display: flex;
  69. align-items: center;
  70. background-color: #fff;
  71. color: #000;
  72. }
  73. .t-navbar__left {
  74. position: relative;
  75. box-sizing: border-box;
  76. width: var(--navbar-right);
  77. display: flex;
  78. align-items: center;
  79. }
  80. .t-navbar__capsule {
  81. box-sizing: border-box;
  82. margin-left: 24rpx;
  83. width: var(--capsule-wight);
  84. height: var(--capsule-height);
  85. line-height: var(--capsule-height);
  86. border-radius: 32rpx;
  87. border: 1rpx solid #e3e6eb;
  88. background: #fff;
  89. display: flex;
  90. align-items: center;
  91. }
  92. .t-navbar__capsule .t-navbar__btn {
  93. flex: 1;
  94. }
  95. .t-navbar__capsule .t-navbar__btn:not(:first-child) {
  96. position: relative;
  97. }
  98. .t-navbar__capsule .t-navbar__btn:not(:first-child)::before {
  99. display: block;
  100. content: '';
  101. position: absolute;
  102. top: 12rpx;
  103. bottom: 12rpx;
  104. left: 0;
  105. background-color: rgba(0, 0, 0, 0.2);
  106. width: 1px;
  107. }
  108. .t-navbar__capsule .t-navbar__btn:first-child {
  109. margin-left: 0rpx;
  110. }
  111. .t-navbar__capsule-icon {
  112. display: flex;
  113. align-items: center;
  114. }
  115. .t-navbar__center {
  116. font-size: 36rpx;
  117. text-align: center;
  118. position: absolute;
  119. left: var(--navbar-right);
  120. width: calc(100% - var(--navbar-right) * 2);
  121. height: var(--navbar-height);
  122. line-height: var(--navbar-height);
  123. flex: 1;
  124. display: flex;
  125. align-items: center;
  126. justify-content: center;
  127. overflow: hidden;
  128. }
  129. .t-navbar__center-title {
  130. text-overflow: ellipsis;
  131. white-space: nowrap;
  132. overflow: hidden;
  133. }
  134. .t-navbar__btn {
  135. box-sizing: border-box;
  136. display: flex;
  137. justify-content: center;
  138. overflow: hidden;
  139. }
  140. .t-navbar__btn:first-child {
  141. margin-left: 24rpx;
  142. }