picker.css 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .wrapper {
  2. 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";
  3. min-width: 170px;
  4. font-size: 14px;
  5. position: relative;
  6. }
  7. .container {
  8. width: 100%;
  9. cursor: text;
  10. overflow: hidden;
  11. }
  12. .input {
  13. width: 100%;
  14. height: 32px;
  15. margin: 0;
  16. padding: 4px 11px;
  17. outline: none;
  18. line-height: 1.5;
  19. box-sizing: border-box;
  20. font-size: 14px;
  21. color: rgba(0, 0, 0, 0.65);
  22. border: none;
  23. border-bottom: 1px solid #ccc;
  24. }
  25. .line {
  26. width: 100%;
  27. position: absolute;
  28. bottom: 0;
  29. left: 0;
  30. border-bottom: 1px solid #1890ff;
  31. transform: translateX(-100%);
  32. opacity: 0;
  33. will-change: transfrom;
  34. transition: transform .1s;
  35. }
  36. .container:hover {
  37. border-bottom: none;
  38. }
  39. .container:hover > .line {
  40. transform: translateX(0);
  41. opacity: 1;
  42. }
  43. .calendar {
  44. position: absolute;
  45. margin-top: 8px;
  46. right: 11px;
  47. display: inline-block;
  48. width: 16px;
  49. height: 16px;
  50. background-image: url('../../static/icon-calendar.svg');
  51. background-position: center;
  52. background-size: 16px 16px;
  53. opacity: 1;
  54. transition: opacity .2s;
  55. }
  56. .close {
  57. position: absolute;
  58. margin-top: 8px;
  59. right: 11px;
  60. display: inline-block;
  61. width: 16px;
  62. height: 16px;
  63. background-image: url('../../static/icon-close.svg');
  64. background-position: center;
  65. background-size: 16px 16px;
  66. cursor: pointer;
  67. opacity: 0;
  68. transition: opacity .2s;
  69. }
  70. .container:hover > .calendar {
  71. opacity: 0;
  72. }
  73. .container:hover > .close {
  74. opacity: 1;
  75. }