laydate.css 8.8 KB

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