Guest User

Untitled

a guest
Jun 25th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.59 KB | None | 0 0
  1. /**
  2. *利用深度选择器来修改引入的日历组件的样式 /deep/
  3. */
  4. .date-picker{
  5. /deep/ .ivu-date-picker-cells-header span {
  6. line-height: 26px;
  7. text-align: center;
  8. margin: 3px 9px; /*$$7px*/
  9. color: #bbbec4;
  10. }
  11. /deep/ .ivu-date-picker-cells span {
  12. display: inline-block;
  13. width: 26px;
  14. height: 26px;
  15. margin: 3px 9px; /*$$7px*/
  16. }
  17. /deep/ .ivu-select-dropdown {
  18. width: inherit;
  19. max-height: 400px;
  20. overflow: auto;
  21. margin: 5px 0;
  22. padding: 5px 0;
  23. background-color: #fff;
  24. box-sizing: border-box;
  25. border-radius: 0px;
  26. box-shadow: 0 0px 0px rgba(0, 0, 0, 0.2); /**/
  27. position: absolute;
  28. z-index: 900;
  29. }
  30. /**
  31. *修改日的em背景框的大小
  32. */
  33. /deep/ .ivu-date-picker-cells span em {
  34. display: inline-block;
  35. width: 19px;
  36. height: 19px;
  37. line-height: 20px;
  38. padding: 0px 0.4px 0px 0px;
  39. margin: 2px;
  40. font-style: normal;
  41. border-radius: 50%; /* 移入em时 border-radius: 50%; */
  42. text-align: center;
  43. transition: all .2s ease-in-out;
  44. }
  45. /**
  46. *修改年的em背景框的大小
  47. */
  48. /deep/ .ivu-date-picker-cells-year span em{
  49. width: 40px;
  50. height: 28px;
  51. line-height: 28px;
  52. margin: 0;
  53. }
  54. /**
  55. *修改月的em背景框的大小
  56. */
  57. /deep/.ivu-date-picker-cells-month span em {
  58. width: 30px;
  59. height: 26px;
  60. line-height: 26px;
  61. margin: 0;
  62. }
  63. /**
  64. *消除当前年、月的蓝色阴影
  65. */
  66. /deep/ .ivu-date-picker-cells-year .ivu-date-picker-cells-cell-focused{
  67. background-color: #fff;
  68. }
  69. /deep/ .ivu-date-picker-cells-year .ivu-date-picker-cells-cell-focused em{
  70. background-color: green;
  71. color: #fff;
  72. }
  73. /deep/ .ivu-date-picker-cells-month .ivu-date-picker-cells-cell-focused {
  74. background-color: #fff;
  75. }
  76. /deep/ .ivu-date-picker-cells-month .ivu-date-picker-cells-cell-focused em{
  77. background-color: green;
  78. color: #fff;
  79. }
  80.  
  81. /deep/ .ivu-date-picker-cells-cell-selected em{
  82. background: green;
  83. color: #fff;
  84. border-radius: 50%;
  85. }
  86. // /deep/ .ivu-date-picker-cells-cell-selected em:after{
  87. // content: '选择';
  88. // display: block;
  89. // width: 28px;
  90. // height: 10px;
  91. // color: red;
  92. // background: #fff;
  93. // position: relative;
  94. // z-index: -100;
  95. // }
  96. /deep/ .ivu-date-picker-cells-focused em { /*消除当天日期的蓝色阴影*/
  97. -webkit-box-shadow: 0 0 0 1px rgb(181, 117, 241) inset;
  98. box-shadow: 0 0 0 0 rgb(181, 117, 241) inset;
  99. }
  100. /deep/ .ivu-date-picker-cells span:hover em{
  101. background: green;
  102. color: #fff;
  103. border-radius: 50%;
  104. }
  105. /deep/ .ivu-date-picker .ivu-select-dropdown {
  106. max-width: 340px; /*$$300px*/
  107. margin: auto;
  108. padding: 0;
  109. overflow: visible;
  110. max-height: none;
  111. }
  112. /deep/ .ivu-picker-panel-body {
  113. float: left;
  114. width: 340px; /*$$300px*/
  115. font-size: 13px;
  116. }
  117. /deep/ .ivu-date-picker-header {
  118. height: 40px; /*$$38px*/
  119. line-height: 40px;
  120. text-align: center;
  121. border-bottom: 1px solid #e9eaec;
  122. }
  123. /deep/ .ivu-date-picker-cells {
  124. width: 330px; /*$$280px*/
  125. margin: 10px;
  126. white-space: normal;
  127. }
  128. /deep/ .ivu-date-picker-cells-cell-today em { /*当前天文本颜色为白色*/
  129. color: #fff;
  130. background-color: rgb(181, 117, 241);
  131. }
  132. /deep/ .ivu-date-picker-cells-cell-today em:after { /* 当前天的样式--可以加图片等等。。*/
  133. content: url('../../../assets/images/calendar/today.png');
  134. display: block;
  135. width: 8px;
  136. height: 8px;
  137. color: red;
  138. border-radius: 50%;
  139. background: #fff;
  140. position: absolute;
  141. top: 15px;
  142. right: 6px;
  143. z-index: -100;
  144. }
  145. /deep/ :after, :before {
  146. box-sizing: border-box;
  147. }
  148. /deep/ .ivu-picker-panel-icon-btn {
  149. display: inline-block;
  150. width: 20px;
  151. height: 24px;
  152. line-height: 26px;
  153. margin-top: 8px; /*$$6px*/
  154. text-align: center;
  155. cursor: pointer;
  156. color: #bbbec4;
  157. -webkit-transition: color 0.2s ease-in-out;
  158. transition: color 0.2s ease-in-out;
  159. }
  160. }
Add Comment
Please, Sign In to add comment