laydate.css 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /**
  2. @Name: laydata
  3. @Author: 贤心
  4. **/
  5. html #layuicss-laydate{display: none; position: absolute; width: 1989px;}
  6. /* 初始化 */
  7. .layui-laydate *{margin: 0; padding: 0;}
  8. /* 主体结构 */
  9. .layui-laydate, .layui-laydate *{box-sizing: border-box;}
  10. .layui-laydate{position: absolute; z-index: 66666666; margin: 5px 0; border-radius: 2px; font-size: 14px; -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: both; animation-fill-mode: both;}
  11. .layui-laydate-main{width: 272px;}
  12. .layui-laydate-header *,
  13. .layui-laydate-content td,
  14. .layui-laydate-list li{transition-duration: .3s; -webkit-transition-duration: .3s;}
  15. @-webkit-keyframes laydate-upbit{ /* 微微往上滑入 */
  16. from {-webkit-transform: translate3d(0, 20px, 0); opacity: 0.3;}
  17. to {-webkit-transform: translate3d(0, 0, 0); opacity: 1;}
  18. }
  19. @keyframes laydate-upbit{
  20. from {transform: translate3d(0, 20px, 0); opacity: 0.3;}
  21. to {transform: translate3d(0, 0, 0); opacity: 1;}
  22. }
  23. .layui-laydate{-webkit-animation-name: laydate-upbit; animation-name: laydate-upbit;}
  24. .layui-laydate-static{ position: relative; z-index: 0; display: inline-block; margin: 0; -webkit-animation: none; animation: none;}
  25. /* 展开年月列表时 */
  26. .laydate-ym-show .laydate-prev-m,
  27. .laydate-ym-show .laydate-next-m{display: none !important;}
  28. .laydate-ym-show .laydate-prev-y,
  29. .laydate-ym-show .laydate-next-y{display: inline-block !important;}
  30. .laydate-ym-show .laydate-set-ym span[lay-type="month"]{display: none !important;}
  31. /* 展开时间列表时 */
  32. .laydate-time-show .layui-laydate-header .layui-icon,
  33. .laydate-time-show .laydate-set-ym span[lay-type="year"],
  34. .laydate-time-show .laydate-set-ym span[lay-type="month"]{display: none !important;}
  35. /* 头部结构 */
  36. .layui-laydate-header{position: relative; line-height:30px; padding: 10px 70px 5px;}
  37. .layui-laydate-header *{display: inline-block; vertical-align: bottom;}
  38. .layui-laydate-header i{position: absolute; top: 10px; padding: 0 5px; color: #999; font-size: 18px; cursor: pointer;}
  39. .layui-laydate-header i.laydate-prev-y{left: 15px;}
  40. .layui-laydate-header i.laydate-prev-m{left: 45px;}
  41. .layui-laydate-header i.laydate-next-y{right: 15px;}
  42. .layui-laydate-header i.laydate-next-m{right: 45px;}
  43. .laydate-set-ym{width: 100%; text-align: center; box-sizing: border-box; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
  44. .laydate-set-ym span{padding: 0 5px; cursor: pointer;}
  45. .laydate-time-text{cursor: default !important;}
  46. /* 主体结构 */
  47. .layui-laydate-content{position: relative; padding: 10px; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none;}
  48. .layui-laydate-content table{border-collapse: collapse; border-spacing: 0;}
  49. .layui-laydate-content th,
  50. .layui-laydate-content td{width: 36px; height: 30px; padding: 5px; text-align: center;}
  51. .layui-laydate-content th{font-weight: 400;}
  52. .layui-laydate-content td{position: relative; cursor: pointer;}
  53. .laydate-day-mark{position: absolute; left: 0; top: 0; width: 100%; height: 100%; line-height: 30px; font-size: 12px; overflow: hidden;}
  54. .laydate-day-mark::after{position: absolute; content:''; right: 2px; top: 2px; width: 5px; height: 5px; border-radius: 50%;}
  55. /* 底部结构 */
  56. .layui-laydate-footer{position: relative; height: 46px; line-height: 26px; padding: 10px 20px;}
  57. .layui-laydate-footer span{margin-right: 15px; display: inline-block; cursor: pointer; font-size: 12px;}
  58. .layui-laydate-footer span:hover{color: #5FB878;}
  59. .laydate-footer-btns{position: absolute; right: 10px; top: 10px;}
  60. .laydate-footer-btns span{height: 26px; line-height: 26px; margin: 0 0 0 -1px; padding: 0 10px; border: 1px solid #C9C9C9; background-color: #fff; white-space: nowrap; vertical-align: top; border-radius: 2px;}
  61. /* 年月列表 */
  62. .layui-laydate-list{position: absolute; left: 0; top: 0; width: 100%; height: 100%; padding: 10px; box-sizing: border-box; background-color: #fff;}
  63. .layui-laydate-list>li{position: relative; display: inline-block; width: 33.3%; height: 36px; line-height: 36px; margin: 3px 0; vertical-align: middle; text-align: center; cursor: pointer;}
  64. .laydate-month-list>li{width: 25%; margin: 17px 0;}
  65. .laydate-time-list{}
  66. .laydate-time-list>li{height: 100%; margin: 0; line-height: normal; cursor: default;}
  67. .laydate-time-list p{position: relative; top: -4px; line-height: 29px;}
  68. .laydate-time-list ol{height: 181px; overflow: hidden;}
  69. .laydate-time-list>li:hover ol{overflow-y: auto;}
  70. .laydate-time-list ol li{width: 130%; padding-left: 33px; line-height: 30px; text-align: left; cursor: pointer;}
  71. /* 提示 */
  72. .layui-laydate-hint{position: absolute; top: 115px; left: 50%; width: 250px; margin-left: -125px; line-height: 20px; padding: 15px; text-align: center; font-size: 12px; color: #FF5722;}
  73. /* 双日历 */
  74. .layui-laydate-range{width: 546px;}
  75. .layui-laydate-range .layui-laydate-main{display: inline-block; vertical-align: middle;}
  76. .layui-laydate-range .laydate-main-list-0 .laydate-next-m,
  77. .layui-laydate-range .laydate-main-list-0 .laydate-next-y,
  78. .layui-laydate-range .laydate-main-list-1 .laydate-prev-y,
  79. .layui-laydate-range .laydate-main-list-1 .laydate-prev-m{display: none;}
  80. .layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left: 1px solid #e2e2e2;}
  81. /* 默认简约主题 */
  82. .layui-laydate, .layui-laydate-hint{border: 1px solid #d2d2d2; box-shadow: 0 2px 4px rgba(0,0,0,.12); background-color: #fff; color: #666;}
  83. .layui-laydate-header{border-bottom: 1px solid #e2e2e2;}
  84. .layui-laydate-header i:hover,
  85. .layui-laydate-header span:hover{color: #5FB878;}
  86. .layui-laydate-content{border-top: none 0; border-bottom: none 0;}
  87. .layui-laydate-content th{color: #333;}
  88. .layui-laydate-content td{color: #666;}
  89. .layui-laydate-content td.laydate-selected{background-color: #00F7DE;}
  90. .laydate-selected:hover{background-color: #00F7DE !important;}
  91. .layui-laydate-content td:hover,
  92. .layui-laydate-list li:hover{background-color: #eaeaea; color: #333;}
  93. .laydate-time-list li ol{margin: 0; padding: 0; border: 1px solid #e2e2e2; border-left-width: 0;}
  94. .laydate-time-list li:first-child ol{border-left-width: 1px;}
  95. .laydate-time-list>li:hover{background: none;}
  96. .layui-laydate-content .laydate-day-prev,
  97. .layui-laydate-content .laydate-day-next{color: #d2d2d2;}
  98. .laydate-selected.laydate-day-prev,
  99. .laydate-selected.laydate-day-next{background-color: #f8f8f8 !important;}
  100. .layui-laydate-footer{border-top: 1px solid #e2e2e2;}
  101. .layui-laydate-hint{color: #FF5722;}
  102. .laydate-day-mark::after{background-color: #5FB878;}
  103. .layui-laydate-content td.layui-this .laydate-day-mark::after{display: none;}
  104. .layui-laydate-footer span[lay-type="date"]{color: #5FB878;}
  105. .layui-laydate .layui-this{background-color: #009688 !important; color: #fff !important;}
  106. .layui-laydate .laydate-disabled,
  107. .layui-laydate .laydate-disabled:hover{background:none !important; color: #d2d2d2 !important; cursor: not-allowed !important; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none;}
  108. /* 墨绿/自定义背景色主题 */
  109. .laydate-theme-molv{border: none;}
  110. .laydate-theme-molv.layui-laydate-range{width: 548px}
  111. .laydate-theme-molv .layui-laydate-main{width: 274px;}
  112. .laydate-theme-molv .layui-laydate-header{border: none; background-color: #009688;}
  113. .laydate-theme-molv .layui-laydate-header i,
  114. .laydate-theme-molv .layui-laydate-header span{color: #f6f6f6;}
  115. .laydate-theme-molv .layui-laydate-header i:hover,
  116. .laydate-theme-molv .layui-laydate-header span:hover{color: #fff;}
  117. .laydate-theme-molv .layui-laydate-content{border: 1px solid #e2e2e2; border-top: none; border-bottom: none;}
  118. .laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left: none;}
  119. .laydate-theme-molv .layui-laydate-footer{border: 1px solid #e2e2e2;}
  120. /* 格子主题 */
  121. .laydate-theme-grid .layui-laydate-content td,
  122. .laydate-theme-grid .layui-laydate-content thead,
  123. .laydate-theme-grid .laydate-year-list>li,
  124. .laydate-theme-grid .laydate-month-list>li{border: 1px solid #e2e2e2;}
  125. .laydate-theme-grid .laydate-selected,
  126. .laydate-theme-grid .laydate-selected:hover{background-color: #f2f2f2 !important; color: #009688 !important;}
  127. .laydate-theme-grid .laydate-selected.laydate-day-prev,
  128. .laydate-theme-grid .laydate-selected.laydate-day-next{color: #d2d2d2 !important;}
  129. .laydate-theme-grid .laydate-year-list,
  130. .laydate-theme-grid .laydate-month-list{margin: 1px 0 0 1px;}
  131. .laydate-theme-grid .laydate-year-list>li,
  132. .laydate-theme-grid .laydate-month-list>li{margin: 0 -1px -1px 0;}
  133. .laydate-theme-grid .laydate-year-list>li{height: 43px; line-height: 43px;}
  134. .laydate-theme-grid .laydate-month-list>li{height: 71px; line-height: 71px;}