uni-collapse-item.wxss 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. @charset "UTF-8";
  2. /**
  3. * 这里是uni-app内置的常用样式变量
  4. *
  5. * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
  6. * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
  7. *
  8. */
  9. /**
  10. * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
  11. *
  12. * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
  13. */
  14. /* 颜色变量 */
  15. /* 行为相关颜色 */
  16. /* 文字基本颜色 */
  17. /* 背景颜色 */
  18. /* 边框颜色 */
  19. /* 尺寸变量 */
  20. /* 文字尺寸 */
  21. /* 图片尺寸 */
  22. /* Border Radius */
  23. /* 水平间距 */
  24. /* 垂直间距 */
  25. /* 透明度 */
  26. /* 文章场景相关 */
  27. .uni-collapse-item {
  28. box-sizing: border-box;
  29. }
  30. .uni-collapse-item__title {
  31. display: flex;
  32. width: 100%;
  33. box-sizing: border-box;
  34. flex-direction: row;
  35. align-items: center;
  36. transition: border-bottom-color .3s;
  37. }
  38. .uni-collapse-item__title-wrap {
  39. width: 100%;
  40. flex: 1;
  41. }
  42. .uni-collapse-item__title-box {
  43. padding: 0 15px;
  44. display: flex;
  45. width: 100%;
  46. box-sizing: border-box;
  47. flex-direction: row;
  48. justify-content: space-between;
  49. align-items: center;
  50. height: 48px;
  51. line-height: 48px;
  52. background-color: #fff;
  53. color: #303133;
  54. font-size: 13px;
  55. font-weight: 500;
  56. }
  57. .uni-collapse-item__title-box.is-disabled .uni-collapse-item__title-text {
  58. color: #999;
  59. }
  60. .uni-collapse-item__title.uni-collapse-item-border {
  61. border-bottom: 1px solid #ebeef5;
  62. }
  63. .uni-collapse-item__title.is-open {
  64. border-bottom-color: transparent;
  65. }
  66. .uni-collapse-item__title-img {
  67. height: 22px;
  68. width: 22px;
  69. margin-right: 10px;
  70. }
  71. .uni-collapse-item__title-text {
  72. flex: 1;
  73. font-size: 14px;
  74. white-space: nowrap;
  75. color: inherit;
  76. overflow: hidden;
  77. text-overflow: ellipsis;
  78. }
  79. .uni-collapse-item__title-arrow {
  80. display: flex;
  81. box-sizing: border-box;
  82. align-items: center;
  83. justify-content: center;
  84. width: 20px;
  85. height: 20px;
  86. margin-right: 10px;
  87. -webkit-transform: rotate(0deg);
  88. transform: rotate(0deg);
  89. }
  90. .uni-collapse-item__title-arrow-active {
  91. -webkit-transform: rotate(-180deg);
  92. transform: rotate(-180deg);
  93. }
  94. .uni-collapse-item__wrap {
  95. will-change: height;
  96. box-sizing: border-box;
  97. background-color: #fff;
  98. overflow: hidden;
  99. position: relative;
  100. height: 0;
  101. }
  102. .uni-collapse-item__wrap.is--transition {
  103. transition-property: height, border-bottom-width;
  104. transition-duration: 0.3s;
  105. will-change: height;
  106. }
  107. .uni-collapse-item__wrap-content {
  108. position: absolute;
  109. font-size: 13px;
  110. color: #303133;
  111. border-bottom-color: transparent;
  112. border-bottom-style: solid;
  113. border-bottom-width: 0;
  114. }
  115. .uni-collapse-item__wrap-content.uni-collapse-item--border {
  116. border-bottom-width: 1px;
  117. border-bottom-color: red;
  118. border-bottom-color: #ebeef5;
  119. }
  120. .uni-collapse-item__wrap-content.open {
  121. position: relative;
  122. }
  123. .uni-collapse-item--animation {
  124. transition-property: -webkit-transform;
  125. transition-property: transform;
  126. transition-property: transform, -webkit-transform;
  127. transition-duration: 0.3s;
  128. transition-timing-function: ease;
  129. }