components.scss 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /******************** 这里放组件样式 ********************/
  2. /***** view *****/
  3. view{box-sizing: border-box;}
  4. /***** 对齐方式 *****/
  5. .ezy-tl{text-align: left;}
  6. .ezy-tc{text-align: center;}
  7. .ezy-tr{text-align: right;}
  8. /***** 状态栏 *****/
  9. .ezy-status-bar{height: var(--status-bar-height);width: 100%;background-color: red;}
  10. /***** 页面高度 *****/
  11. /* #ifdef H5 */
  12. //标题栏
  13. $titleBar-page: calc(100vh - var(--status-bar-height));
  14. //tabBar
  15. $titleBar-page: calc(100vh - var(--window-bottom));
  16. //标题栏 + tabBar
  17. $titleBar-tabBar-page: calc(100vh - var(--status-bar-height) - var(--window-bottom));
  18. /* #endif */
  19. /* #ifdef APP-PLUS */
  20. //标题栏
  21. $titleBar-page: calc(100vh - var(--status-bar-height));
  22. //tabBar
  23. $titleBar-page: 100vh;
  24. //标题栏 + tabBar
  25. $titleBar-tabBar-page: calc(100vh - var(--status-bar-height));
  26. /* #endif */
  27. /***** 页面背景图 *****/
  28. // no-repeat cover
  29. @mixin ezy-no-repeat-cover($position: center) {
  30. background-position: $position;background-size: cover;background-repeat: no-repeat;
  31. }
  32. // no-repeat contain
  33. @mixin ezy-no-repeat-contain($position: center) {
  34. background-position: $position;background-size: contain;background-repeat: no-repeat;
  35. }
  36. // 全屏的popup弹窗
  37. .ezy-popup-width-all{
  38. width: 100%;
  39. .uni-popup__wrapper{width: 100%;}
  40. }
  41. /***** tabbar *****/
  42. .ezy-custom-tabbar{
  43. width: 100%;height: 150rpx;position: fixed;left: var(-window-left);right: var(-window right);
  44. bottom: var(--window-bottom);padding-bottom: env(safe-area-inset-bottom);box-sizing: border-box;z-index: 9;
  45. .tabbar-item-box{display: flex;flex-wrap: nowrap;justify-content: space-evenly;
  46. box-sizing: border-box;padding: 0 46rpx;
  47. }
  48. .tabbar-item{width: 135rpx;height: 144rpx;@include ezy-no-repeat-cover;z-index: 2;}
  49. }
  50. .ezy-custom-tabbar::before{
  51. content: '';width: 750rpx;height: 100rpx;left: 0;bottom: 0;position: absolute;
  52. background-image: url("@/static/images/tabbar/tabbar-bg.png");@include ezy-no-repeat-cover(top);
  53. }
  54. /***** 标题栏 *****/
  55. // 三个元素
  56. .ezy-navBar-box{
  57. display: flex;align-items: center;justify-content: space-between;
  58. padding: 0 20rpx;box-sizing: border-box;
  59. .nav-bar-icon{
  60. width: 63rpx;height: 63rpx;
  61. background-image: url("@/static/images/common/navBar-return-btn.png");@include ezy-no-repeat-cover();
  62. }
  63. .nav-bar-title{
  64. font-size: 36rpx;color: #fff;
  65. }
  66. .nav-bar-other{
  67. font-size: 30rpx;color: #fff;
  68. .key-note{color: #ffff01;}
  69. }
  70. }
  71. // 两个元素
  72. .icon-title-navBar-box{
  73. display: flex;align-items: center;justify-content: center;
  74. padding: 0 20rpx;box-sizing: border-box;position: relative;
  75. .nav-bar-title{
  76. font-size: 36rpx;height: 63rpx;line-height: 63rpx;color: #fff;max-width: 70%;
  77. }
  78. .nav-bar-icon{
  79. width: 63rpx;height: 63rpx;position: absolute;left: 20rpx;top: 0;
  80. background-image: url("@/static/images/common/navBar-return-btn.png");@include ezy-no-repeat-cover();
  81. }
  82. }
  83. /***** 单选题 *****/
  84. .ezy-danxuan-box{
  85. margin: 0 10rpx;
  86. .danxuan-title{
  87. width: 231rpx;height: 63rpx;
  88. background-image: url("@/static/images/exam/danxuan-title.png");@include ezy-no-repeat-cover();
  89. }
  90. .danxuan-question{
  91. margin: 24rpx 0 42rpx;font-size: 32rpx;color: #333;line-height: 1.6;padding: 0 10rpx 0 20rpx;box-sizing: border-box;
  92. text-align: justify;word-wrap: break-word;word-break: break-all;
  93. }
  94. .danxuan-option{
  95. width: 596rpx;height: 93rpx;line-height:96rpx;background-color:#fff;border-radius: 8px;margin-bottom: 20rpx;
  96. font-size: 32rpx;color: #333;box-sizing: border-box;padding: 0 24rpx;@include ezy-no-repeat-cover();
  97. }
  98. .danxuan-option.active{
  99. color: #fff;background-color: transparent;background-image: url("@/static/images/exam/option-active.png");
  100. }
  101. .danxuan-option.showError{
  102. color: #fff;background-color: transparent;background-image: url("@/static/images/exam/option-error.png");
  103. }
  104. .danxuan-option.active_right{
  105. color: #fff;background-color: transparent;background-image: url("@/static/images/exam/option-right.png");
  106. }
  107. }
  108. /***** 试题白色的框 *****/
  109. .shiti-frame-box{
  110. flex: 1;width: 92%;height: auto;background-color: rgba(255, 255, 255, 0.6);border-radius: 10px;
  111. margin: 32rpx auto;position: relative;padding: 10% 0 6%;box-sizing: border-box;display: flex;flex-direction: column;
  112. }
  113. .shiti-frame-box::before{
  114. content: "";display: block;background-color: rgba(255, 255, 255, 0.6);border-radius: 0 0 10rpx 10rpx;
  115. position: absolute;top: 20rpx;left: 20rpx;right: 20rpx;bottom: 30rpx;z-index: 1;
  116. }
  117. /***** 模拟标题栏 *****/
  118. .ezy-title-bar {
  119. height: calc(44px + env(safe-area-inset-top));
  120. position: fixed;top: var(--status-bar-height);left: var(--window-left);right: var(--window-right);
  121. background-color: rgb(248, 248, 248);color: rgb(0, 0, 0);box-sizing: border-box;
  122. display: flex;align-items: center;justify-content: center;overflow: hidden;z-index: 998;
  123. }