picker.css 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. * {
  2. box-sizing: border-box;
  3. }
  4. .wrapper {
  5. font-family: "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  6. min-width: 170px;
  7. font-size: 14px;
  8. position: relative;
  9. }
  10. .container {
  11. width: 100%;
  12. cursor: text;
  13. overflow: hidden;
  14. }
  15. .input-disable {
  16. width: 100%;
  17. height: 100%;
  18. position: absolute;
  19. top: 0;
  20. left: 0;
  21. right: 0;
  22. bottom: 0;
  23. z-index: 4;
  24. cursor: not-allowed;
  25. }
  26. .input-wrapper {
  27. display: inline-block;
  28. width: 100%;
  29. height: 32px;
  30. }
  31. .input {
  32. width: 100%;
  33. height: 32px;
  34. margin: 0;
  35. padding: 4px 11px;
  36. outline: none;
  37. line-height: 1.5;
  38. box-sizing: border-box;
  39. font-size: 14px;
  40. color: rgba(0, 0, 0, 0.65);
  41. border: none;
  42. border-bottom: 1px solid #ccc;
  43. }
  44. .disable {
  45. background-color: #f5f5f5;
  46. opacity: 1;
  47. color: rgba(0, 0, 0, 0.25);
  48. }
  49. .line {
  50. width: 100%;
  51. position: absolute;
  52. bottom: 0;
  53. left: 0;
  54. border-bottom: 1px solid #1890ff;
  55. transform: translateX(-100%);
  56. opacity: 0;
  57. will-change: transfrom;
  58. transition: transform .1s;
  59. }
  60. .container:hover {
  61. border-bottom: none;
  62. }
  63. .container:hover > .line {
  64. transform: translateX(0);
  65. opacity: 1;
  66. }
  67. .calendar {
  68. position: absolute;
  69. margin-top: 8px;
  70. right: 11px;
  71. display: inline-block;
  72. width: 16px;
  73. height: 16px;
  74. background-image: url('../../static/icon-calendar.svg');
  75. background-position: center;
  76. background-size: 16px 16px;
  77. opacity: 1;
  78. transition: opacity .2s;
  79. }
  80. .close {
  81. position: absolute;
  82. margin-top: 8px;
  83. right: 11px;
  84. display: inline-block;
  85. width: 16px;
  86. height: 16px;
  87. background-image: url('../../static/icon-close.svg');
  88. background-position: center;
  89. background-size: 16px 16px;
  90. cursor: pointer;
  91. opacity: 0;
  92. transition: opacity .2s;
  93. }
  94. .container:hover > .calendar {
  95. opacity: 0;
  96. }
  97. .container:hover > .close {
  98. opacity: 1;
  99. }
  100. .input-disable:hover > .calendar {
  101. opacity: 1;
  102. }
  103. .input-disable:hover > .close {
  104. opacity: 0;
  105. }