uni.scss 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. /**
  2. * 这里是uni-app内置的常用样式变量
  3. *
  4. * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
  5. * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
  6. *
  7. */
  8. /**
  9. * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
  10. *
  11. * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
  12. */
  13. /* 颜色变量 */
  14. /* 行为相关颜色 */
  15. $uni-color-primary: #007aff;
  16. $uni-color-success: #4cd964;
  17. $uni-color-warning: #f0ad4e;
  18. $uni-color-error: #dd524d;
  19. /* 文字基本颜色 */
  20. $uni-text-color:#333;//基本色
  21. $uni-text-color-inverse:#fff;//反色
  22. $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
  23. $uni-text-color-placeholder: #808080;
  24. $uni-text-color-disable:#c0c0c0;
  25. /* 背景颜色 */
  26. $uni-bg-color:#ffffff;
  27. $uni-bg-color-grey:#f8f8f8;
  28. $uni-bg-color-hover:#f1f1f1;//点击状态颜色
  29. $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
  30. /* 边框颜色 */
  31. $uni-border-color:#c8c7cc;
  32. /* 尺寸变量 */
  33. /* 文字尺寸 */
  34. $uni-font-size-sm:12px;
  35. $uni-font-size-base:14px;
  36. $uni-font-size-lg:16;
  37. /* 图片尺寸 */
  38. $uni-img-size-sm:20px;
  39. $uni-img-size-base:26px;
  40. $uni-img-size-lg:40px;
  41. /* Border Radius */
  42. $uni-border-radius-sm: 2px;
  43. $uni-border-radius-base: 3px;
  44. $uni-border-radius-lg: 6px;
  45. $uni-border-radius-circle: 50%;
  46. /* 水平间距 */
  47. $uni-spacing-row-sm: 5px;
  48. $uni-spacing-row-base: 10px;
  49. $uni-spacing-row-lg: 15px;
  50. /* 垂直间距 */
  51. $uni-spacing-col-sm: 4px;
  52. $uni-spacing-col-base: 8px;
  53. $uni-spacing-col-lg: 12px;
  54. /* 透明度 */
  55. $uni-opacity-disabled: 0.3; // 组件禁用态的透明度
  56. /* 文章场景相关 */
  57. $uni-color-title: #2C405A; // 文章标题颜色
  58. $uni-font-size-title:20px;
  59. $uni-color-subtitle: #555555; // 二级标题颜色
  60. $uni-font-size-subtitle:26px;
  61. $uni-color-paragraph: #3F536E; // 文章段落颜色
  62. $uni-font-size-paragraph:15px;
  63. //
  64. $u-nav-bar-height: 160rpx;
  65. .u-nav-content {
  66. margin-top: $u-nav-bar-height;
  67. }
  68. // 全局初始化样式
  69. * {
  70. line-height: 1;
  71. padding: 0;
  72. margin: 0;
  73. box-sizing: border-box;
  74. font-family: Microsoft YaHei;
  75. }
  76. // u-flex
  77. @mixin u-flex {
  78. display: flex;
  79. align-items: center;
  80. width: 100%;
  81. height: 100%;
  82. justify-content: space-between;
  83. }
  84. .u-flex {
  85. @include u-flex;
  86. }
  87. .u-flex-column {
  88. @include u-flex;
  89. flex-direction: column;
  90. }
  91. .u-flex-center {
  92. @include u-flex;
  93. justify-content: center;
  94. }
  95. //
  96. //
  97. .u-bg {
  98. width: 100%;
  99. // sbackground: $uni-color-primary;
  100. // background: url('/static/my_grades_bg.png');
  101. // background-size: 100% 100%;
  102. // background-repeat: no-repeat;
  103. // background-position: center;
  104. // background-origin: content-box;
  105. position: absolute;
  106. top: 0;
  107. bottom: 0;
  108. z-index: -1;
  109. }
  110. .u-button {
  111. width: auto;
  112. padding: 0 40rpx;
  113. height: 70rpx;
  114. background: linear-gradient(90deg, #36ACFC 0%, #078EF7 100%);
  115. border-radius: 36rpx;
  116. display: flex;
  117. align-items: center;
  118. justify-content: center;
  119. font-size: 32rpx;
  120. font-weight: bold;
  121. color: #FFFFFF;
  122. cursor: pointer;
  123. &:hover {
  124. opacity: 0.8;
  125. }
  126. }
  127. .u-right-icon {
  128. cursor: pointer;
  129. padding: 8rpx 0 8rpx 12rpx;
  130. }
  131. // 空两格
  132. .empty-2 {
  133. width: 44rpx; height: 1px; display: inline-block;
  134. }
  135. //
  136. .u-sign-preview{
  137. width: 128rpx;
  138. height: auto;
  139. position: relative;
  140. .icon-clear {
  141. position: absolute;
  142. top: 0;
  143. right: 0;
  144. width: 36rpx;
  145. height: 36rpx;
  146. background: rgba($color: #333333, $alpha: 0.55);
  147. z-index: 1;
  148. border-radius: 0px 8rpx 0px 8rpx;
  149. cursor: pointer;
  150. }
  151. }
  152. .u-disabled-mask {
  153. position: fixed;
  154. top: 0;
  155. left: 0;
  156. bottom: 0;
  157. right: 0;
  158. z-index: 99;
  159. cursor: not-allowed;
  160. background-color: rgba(0, 0, 0, 0.05);
  161. }