uni.scss 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. $app-base-bg: #F2F2F2; // app 页面背景色
  2. $app-base-color: #F76454; // app 主题颜色
  3. $app-sec-text-color: #999999; // app 次要文字颜色
  4. $app-main-text-color: #333333; // app 主题文字颜色
  5. $app-tabbar-height: 98rpx; // app tabbar高度
  6. $app-nav-height: 128rpx; // app 导航栏高度
  7. $app-item-height: 90rpx; // app 功能列表项高度
  8. $app-item-line-height: 2rpx; // app 功能列表项分割线高度
  9. $app-item-padding-width: 30rpx; // app 功能列表项左右空白宽度
  10. @mixin page {
  11. height: 100%;
  12. box-sizing: border-box;
  13. flex-direction: column;
  14. background: $app-base-bg;
  15. // border-top: $app-nav-height solid #FFFFFF;
  16. .content {
  17. flex: 1;
  18. height: 100%;
  19. position: relative;
  20. box-sizing: border-box;
  21. }
  22. }
  23. @mixin flex($c: row) {
  24. display: flex;
  25. align-items: center;
  26. justify-content: center;
  27. flex-direction: $c;
  28. }
  29. .app-item { // app 列表项样式
  30. @include flex();
  31. font-size: 32rpx;
  32. position: relative;
  33. background: #FFFFFF;
  34. box-sizing: border-box;
  35. min-height: $app-item-height;
  36. justify-content: space-between;
  37. padding: 0 $app-item-padding-width;
  38. margin-bottom: $app-item-line-height;
  39. &.item-space {
  40. margin-top: 10rpx;
  41. }
  42. input, picker, textarea {
  43. height: 100%;
  44. width: 521rpx;
  45. font-size: 26rpx;
  46. text-align: left;
  47. color: $app-sec-text-color;
  48. }
  49. }
  50. .kingkong { // 金刚区 样式
  51. height: 346rpx;
  52. margin-top: 10rpx;
  53. navigator {
  54. width: 25%;
  55. height: 50%;
  56. float: left;
  57. display: flex;
  58. align-items: center;
  59. flex-direction: column;
  60. image {
  61. width: 88rpx;
  62. height: 88rpx;
  63. margin-top: 30rpx;
  64. border-radius: 50%;
  65. }
  66. text {
  67. font-size: 32rpx;
  68. margin-top: 12rpx;
  69. }
  70. }
  71. }
  72. .big-btn { // 大按钮样式(镂空)
  73. @include flex();
  74. width: 630rpx;
  75. height: 88rpx;
  76. font-size: 34rpx;
  77. margin: 88rpx auto 0;
  78. border-radius: 44rpx;
  79. color: $app-base-color;
  80. border:2px solid $app-base-color;
  81. &.bg { // 背景
  82. color: #FFFFFF;
  83. background: $app-base-color;
  84. }
  85. }
  86. .small-btn { // 小按钮样式(镂空)
  87. @include flex();
  88. padding: 0 14rpx;
  89. font-size: 26rpx;
  90. margin-left: 10rpx;
  91. color: $app-base-color;
  92. height: 48rpx!important;
  93. min-width: 106rpx!important;
  94. border: 2rpx solid $app-base-color;
  95. &.dank { // 小按钮 (灰色)
  96. color: $app-sec-text-color;
  97. border-color: $app-sec-text-color;
  98. }
  99. }
  100. .login-btn { // 登录按钮
  101. flex: 1;
  102. width: 100%;
  103. height: 100%;
  104. background: #FFFFFF;
  105. navigator {
  106. @include flex();
  107. top: 50%;
  108. left: 50%;
  109. width: 400rpx;
  110. height: 88rpx;
  111. color: #FFFFFF;
  112. position: fixed;
  113. font-size: 32rpx;
  114. border-radius: 10rpx;
  115. background: $app-base-color;
  116. transform: translate(-50%, -50%);
  117. }
  118. }
  119. .ellipsis { // 文字溢出打点换行
  120. overflow: hidden;
  121. white-space: nowrap;
  122. text-overflow: ellipsis;
  123. }
  124. .icon-right { // 图标右侧空出
  125. margin-right: 20rpx;
  126. }
  127. .border-right { // 右边框
  128. border-right: 1rpx solid $app-base-bg;
  129. }
  130. .level-name {
  131. @include flex();
  132. width: 130rpx;
  133. height: 36rpx;
  134. color: #FFFFFF;
  135. font-size: 16rpx!important;
  136. border-radius: 18rpx;
  137. background: $app-base-color;
  138. .cuIcon-crownfill {
  139. margin-right: 6rpx;
  140. }
  141. }
  142. .position-center { // 水平垂直居中
  143. left: 50%;
  144. top: 50%;
  145. position: absolute;
  146. transform: translate(-50%, -50%);
  147. }
  148. .data-card { // 数据卡片样式
  149. @include flex();
  150. width: 100%;
  151. height: 336rpx;
  152. position: relative;
  153. background: $app-base-bg;
  154. image {
  155. z-index: 0;
  156. width: 706rpx;
  157. height: 316rpx;
  158. }
  159. .data-card-text {
  160. width: 100%;
  161. height: 100%;
  162. @include flex(column);
  163. .text {
  164. color: #FFFFFF;
  165. font-size: 32rpx;
  166. }
  167. .num {
  168. color: #FFFFFF;
  169. font-size: 70rpx;
  170. margin-top: 60rpx;
  171. }
  172. }
  173. }
  174. .basecolor { // 文字 主题色
  175. color: $app-base-color
  176. }
  177. .swiper-nav { // 滑动切换导航
  178. @include flex();
  179. width: 100%;
  180. height: 84rpx;
  181. color: #666666;
  182. font-size: 32rpx;
  183. position: relative;
  184. background: #FFFFFF;
  185. box-sizing: border-box;
  186. border-bottom: 1rpx solid $app-base-bg;
  187. .item {
  188. @include flex();
  189. flex: 1;
  190. height: 100%;
  191. &.active {
  192. color: $app-base-color;
  193. }
  194. }
  195. .moveBar {
  196. @include flex();
  197. bottom: 0;
  198. height: 6rpx;
  199. position: absolute;
  200. > text {
  201. width: 100%;
  202. height: 100%;
  203. border-radius: 3rpx;
  204. background: $app-base-color;
  205. }
  206. }
  207. }
  208. .swiper-area { // 滑动切换内容
  209. flex: 1;
  210. width: 100%;
  211. swiper {
  212. width: 100%;
  213. height: 100%;
  214. }
  215. }
  216. .article-header { // 文章发布人信息
  217. @include flex();
  218. height: 120rpx;
  219. justify-content: space-between;
  220. border-bottom: 1rpx solid $app-base-bg;
  221. .head-pic {
  222. width: 80rpx;
  223. height: 80rpx;
  224. border-radius: 50%;
  225. }
  226. .name {
  227. @include flex();
  228. flex: 1;
  229. height: 100%;
  230. margin-left: 20rpx;
  231. justify-content: flex-start;
  232. .identity {
  233. @include flex();
  234. width: 56rpx;
  235. height: 28rpx;
  236. color: #FFFFFF;
  237. font-size: 20rpx;
  238. margin-left: 20rpx;
  239. border-radius: 8rpx;
  240. background: $app-base-color;
  241. }
  242. }
  243. .time {
  244. font-size: 24rpx;
  245. color: #999999;
  246. &.justnow {
  247. color: $app-base-color;
  248. }
  249. }
  250. }
  251. .article-footer { // 文章点赞收藏转发
  252. @include flex();
  253. height: 90rpx;
  254. border-top: 1rpx solid $app-base-bg;
  255. .footer-item {
  256. @include flex();
  257. flex: 1;
  258. height: 40rpx;
  259. &.center {
  260. border-left: 1rpx solid #CCCCCC;
  261. border-right: 1rpx solid #CCCCCC;
  262. }
  263. .icon-right {
  264. font-size: 40rpx;
  265. &.fill {
  266. color: $app-base-color;
  267. }
  268. }
  269. }
  270. }
  271. /**
  272. * 这里是uni-app内置的常用样式变量
  273. *
  274. * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
  275. * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
  276. *
  277. */
  278. /**
  279. * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
  280. *
  281. * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
  282. */
  283. /* 颜色变量 */
  284. /* 行为相关颜色 */
  285. $uni-color-primary: #007aff;
  286. $uni-color-success: #4cd964;
  287. $uni-color-warning: #f0ad4e;
  288. $uni-color-error: #dd524d;
  289. /* 文字基本颜色 */
  290. $uni-text-color:#333;//基本色
  291. $uni-text-color-inverse:#fff;//反色
  292. $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
  293. $uni-text-color-placeholder: #808080;
  294. $uni-text-color-disable:#c0c0c0;
  295. /* 背景颜色 */
  296. $uni-bg-color:#ffffff;
  297. $uni-bg-color-grey:#f8f8f8;
  298. $uni-bg-color-hover:#f1f1f1;//点击状态颜色
  299. $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
  300. /* 边框颜色 */
  301. $uni-border-color:#c8c7cc;
  302. /* 尺寸变量 */
  303. /* 文字尺寸 */
  304. $uni-font-size-sm:24upx;
  305. $uni-font-size-base:28upx;
  306. $uni-font-size-lg:32upx;
  307. /* 图片尺寸 */
  308. $uni-img-size-sm:40upx;
  309. $uni-img-size-base:52upx;
  310. $uni-img-size-lg:80upx;
  311. /* Border Radius */
  312. $uni-border-radius-sm: 4upx;
  313. $uni-border-radius-base: 6upx;
  314. $uni-border-radius-lg: 12upx;
  315. $uni-border-radius-circle: 50%;
  316. /* 水平间距 */
  317. $uni-spacing-row-sm: 10px;
  318. $uni-spacing-row-base: 20upx;
  319. $uni-spacing-row-lg: 30upx;
  320. /* 垂直间距 */
  321. $uni-spacing-col-sm: 8upx;
  322. $uni-spacing-col-base: 16upx;
  323. $uni-spacing-col-lg: 24upx;
  324. /* 透明度 */
  325. $uni-opacity-disabled: 0.3; // 组件禁用态的透明度
  326. /* 文章场景相关 */
  327. $uni-color-title: #2C405A; // 文章标题颜色
  328. $uni-font-size-title:40upx;
  329. $uni-color-subtitle: #555555; // 二级标题颜色
  330. $uni-font-size-subtitle:36upx;
  331. $uni-color-paragraph: #3F536E; // 文章段落颜色
  332. $uni-font-size-paragraph:30upx;