pageHead.css 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. uni-page-head {
  2. display: block;
  3. box-sizing: border-box;
  4. }
  5. .uni-page-head {
  6. position: fixed;
  7. left: var(--window-left);
  8. right: var(--window-right);
  9. height: 44px;
  10. height: calc(44px + constant(safe-area-inset-top));
  11. height: calc(44px + env(safe-area-inset-top));
  12. padding: 7px 3px;
  13. padding-top: calc(7px + constant(safe-area-inset-top));
  14. padding-top: calc(7px + env(safe-area-inset-top));
  15. display: flex;
  16. overflow: hidden;
  17. justify-content: space-between;
  18. box-sizing: border-box;
  19. z-index: 998;
  20. color: #fff;
  21. background-color: #000;
  22. transition-property: all;
  23. }
  24. .uni-page-head * {
  25. box-sizing: border-box;
  26. }
  27. .uni-page-head .uni-btn-icon {
  28. overflow: hidden;
  29. min-width: 1em;
  30. font-style: normal;
  31. }
  32. .uni-page-head-titlePenetrate,
  33. .uni-page-head-titlePenetrate .uni-page-head-bd,
  34. .uni-page-head-titlePenetrate .uni-page-head-bd * {
  35. pointer-events: none;
  36. }
  37. .uni-page-head-titlePenetrate * {
  38. pointer-events: auto;
  39. }
  40. .uni-page-head.uni-page-head-transparent .uni-page-head-ft > div {
  41. justify-content: center;
  42. }
  43. .uni-page-head ~ .uni-placeholder {
  44. width: 100%;
  45. height: 44px;
  46. height: calc(44px + constant(safe-area-inset-top));
  47. height: calc(44px + env(safe-area-inset-top));
  48. }
  49. .uni-placeholder-titlePenetrate {
  50. pointer-events: none;
  51. }
  52. .uni-page-head-hd {
  53. display: flex;
  54. align-items: center;
  55. font-size: 16px;
  56. }
  57. .uni-page-head-bd {
  58. position: absolute;
  59. left: 70px;
  60. right: 70px;
  61. min-width: 0;
  62. user-select: auto;
  63. }
  64. .uni-page-head-btn {
  65. position: relative;
  66. width: auto;
  67. margin: 0 2px;
  68. word-break: keep-all;
  69. white-space: pre;
  70. cursor: pointer;
  71. font-size: 0px;
  72. }
  73. /* .uni-page-head-btn svg {
  74. } */
  75. .uni-page-head-transparent .uni-page-head-btn {
  76. display: flex;
  77. align-items: center;
  78. width: 32px;
  79. height: 32px;
  80. border-radius: 50%;
  81. background-color: rgba(0, 0, 0, 0.5);
  82. }
  83. .uni-page-head-btn-red-dot::after {
  84. content: attr(badge-text);
  85. position: absolute;
  86. right: 0;
  87. top: 0;
  88. background-color: red;
  89. color: white;
  90. width: 18px;
  91. height: 18px;
  92. line-height: 18px;
  93. border-radius: 18px;
  94. overflow: hidden;
  95. transform: scale(0.5) translate(40%, -40%);
  96. transform-origin: 100% 0;
  97. }
  98. .uni-page-head-btn-red-dot[badge-text]::after {
  99. font-size: 12px;
  100. width: auto;
  101. min-width: 18px;
  102. max-width: 42px;
  103. text-align: center;
  104. padding: 0 3px;
  105. transform: scale(0.7) translate(40%, -40%);
  106. }
  107. .uni-page-head-btn-select svg {
  108. vertical-align: middle;
  109. margin-left: 2px;
  110. transform: rotate(270deg) scale(0.8);
  111. }
  112. .uni-page-head-search {
  113. position: relative;
  114. display: flex;
  115. flex: 1;
  116. margin: 0 2px;
  117. line-height: 30px;
  118. font-size: 15px;
  119. }
  120. .uni-page-head-search-input {
  121. width: 100%;
  122. height: 100%;
  123. padding-left: 34px;
  124. text-align: left;
  125. }
  126. .uni-page-head-search-input .uni-input-input:disabled {
  127. pointer-events: none;
  128. }
  129. .uni-page-head-search-placeholder {
  130. position: absolute;
  131. max-width: 100%;
  132. height: 100%;
  133. padding-left: 34px;
  134. overflow: hidden;
  135. word-break: keep-all;
  136. white-space: pre;
  137. }
  138. .uni-page-head-search-placeholder-right {
  139. right: 0;
  140. }
  141. .uni-page-head-search-placeholder-center {
  142. left: 50%;
  143. transform: translateX(-50%);
  144. }
  145. .uni-page-head-search-icon {
  146. position: absolute;
  147. top: 0;
  148. left: 2px;
  149. width: 30px;
  150. height: 30px;
  151. display: flex;
  152. justify-content: center;
  153. align-items: center;
  154. }
  155. .uni-page-head-ft {
  156. display: flex;
  157. align-items: center;
  158. flex-direction: row-reverse;
  159. font-size: 13px;
  160. }
  161. .uni-page-head__title {
  162. font-weight: bold;
  163. font-size: 16px;
  164. line-height: 30px;
  165. text-align: center;
  166. overflow: hidden;
  167. white-space: nowrap;
  168. text-overflow: ellipsis;
  169. }
  170. .uni-page-head__title .uni-loading {
  171. width: 16px;
  172. height: 16px;
  173. margin-top: -3px;
  174. }
  175. .uni-page-head__title .uni-page-head__title_image {
  176. width: auto;
  177. height: 26px;
  178. vertical-align: middle;
  179. }
  180. .uni-page-head-shadow {
  181. overflow: visible;
  182. }
  183. .uni-page-head-shadow::after {
  184. content: '';
  185. position: absolute;
  186. left: 0;
  187. right: 0;
  188. top: 100%;
  189. height: 5px;
  190. background-size: 100% 100%;
  191. }
  192. uni-page-head[uni-page-head-type='default'] ~ uni-page-wrapper {
  193. height: calc(100% - 44px);
  194. height: calc(100% - 44px - constant(safe-area-inset-top));
  195. height: calc(100% - 44px - env(safe-area-inset-top));
  196. }