uni-collapse-item.wxss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. /* 文字基本颜色 */
  16. /* 背景颜色 */
  17. /* 边框颜色 */
  18. /* 尺寸变量 */
  19. /* 文字尺寸 */
  20. /* 图片尺寸 */
  21. /* Border Radius */
  22. /* 水平间距 */
  23. /* 垂直间距 */
  24. /* 透明度 */
  25. /* 文章场景相关 */
  26. .uni-collapse-item {
  27. box-sizing: border-box;
  28. }
  29. .uni-collapse-item__title {
  30. display: flex;
  31. width: 100%;
  32. box-sizing: border-box;
  33. flex-direction: row;
  34. align-items: center;
  35. transition: border-bottom-color 0.3s;
  36. }
  37. .uni-collapse-item__title-wrap {
  38. width: 100%;
  39. flex: 1;
  40. }
  41. .uni-collapse-item__title-box {
  42. padding: 0 15px;
  43. display: flex;
  44. width: 100%;
  45. box-sizing: border-box;
  46. flex-direction: row;
  47. justify-content: space-between;
  48. align-items: center;
  49. height: 48px;
  50. line-height: 48px;
  51. background-color: #fff;
  52. color: #303133;
  53. font-size: 13px;
  54. font-weight: 500;
  55. }
  56. .uni-collapse-item__title-box.is-disabled .uni-collapse-item__title-text {
  57. color: #999;
  58. }
  59. .uni-collapse-item__title.uni-collapse-item-border {
  60. border-bottom: 1px solid #ebeef5;
  61. }
  62. .uni-collapse-item__title.is-open {
  63. border-bottom-color: transparent;
  64. }
  65. .uni-collapse-item__title-img {
  66. height: 22px;
  67. width: 22px;
  68. margin-right: 10px;
  69. }
  70. .uni-collapse-item__title-text {
  71. flex: 1;
  72. font-size: 14px;
  73. white-space: nowrap;
  74. color: inherit;
  75. overflow: hidden;
  76. text-overflow: ellipsis;
  77. }
  78. .uni-collapse-item__title-arrow {
  79. display: flex;
  80. box-sizing: border-box;
  81. align-items: center;
  82. justify-content: center;
  83. width: 20px;
  84. height: 20px;
  85. margin-right: 10px;
  86. transform: rotate(0deg);
  87. }
  88. .uni-collapse-item__title-arrow-active {
  89. transform: rotate(-180deg);
  90. }
  91. .uni-collapse-item__wrap {
  92. will-change: height;
  93. box-sizing: border-box;
  94. background-color: #fff;
  95. overflow: hidden;
  96. position: relative;
  97. height: 0;
  98. }
  99. .uni-collapse-item__wrap.is--transition {
  100. transition-property: height, border-bottom-width;
  101. transition-duration: 0.3s;
  102. will-change: height;
  103. }
  104. .uni-collapse-item__wrap-content {
  105. position: absolute;
  106. font-size: 13px;
  107. color: #303133;
  108. border-bottom-color: transparent;
  109. border-bottom-style: solid;
  110. border-bottom-width: 0;
  111. }
  112. .uni-collapse-item__wrap-content.uni-collapse-item--border {
  113. border-bottom-width: 1px;
  114. border-bottom-color: red;
  115. border-bottom-color: #ebeef5;
  116. }
  117. .uni-collapse-item__wrap-content.open {
  118. position: relative;
  119. }
  120. .uni-collapse-item--animation {
  121. transition-property: transform;
  122. transition-duration: 0.3s;
  123. transition-timing-function: ease;
  124. }