_ui.accordion.scss 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. @charset "utf-8";
  2. /*
  3. * @file: 手风琴UI组件
  4. * @update: 2015-06-03 16:36:10
  5. */
  6. /*
  7. * 默认手风琴(horizontal)
  8. * @base
  9. */
  10. $base-width: 500px; // 手风琴宽度
  11. $base-content-height: 150px; // content高度
  12. .ui-accordion {
  13. width: $base-width;
  14. }
  15. .ui-accordion__hd {
  16. @include clearfix;
  17. padding: 8px 10px;
  18. margin-top: -1px;
  19. background-color: $heading-bg-color;
  20. border: 1px solid $base-border-color;
  21. cursor: pointer;
  22. &.is-active {
  23. background-color: $active-bg-color;
  24. cursor: default;
  25. }
  26. }
  27. .ui-accordion__tit {
  28. float: left;
  29. }
  30. .ui-accordion__ext {
  31. float: right;
  32. }
  33. .ui-accordion__bd {
  34. height: $base-content-height;
  35. padding: 10px;
  36. border: 1px solid $base-border-color;
  37. border-top-width: 0;
  38. }
  39. /*
  40. * 纵向手风琴
  41. * @extend: vertical
  42. */
  43. $vertical-content-width: 320px; // content宽度
  44. $vertical-content-height: 300px; // content高度
  45. .ui-accordion {
  46. &.ext-vertical {
  47. @include clearfix;
  48. width: auto;
  49. .ui-accordion__hd {
  50. float: left;
  51. width: 18px;
  52. height: $vertical-content-height;
  53. padding: 10px 8px;
  54. margin-top: 0;
  55. margin-left: -1px;
  56. text-align: center;
  57. }
  58. .ui-accordion__bd {
  59. float: left;
  60. width: $vertical-content-width;
  61. height: $vertical-content-height;
  62. margin-left: -1px;
  63. border-top-width: 1px;
  64. }
  65. }
  66. }