image.scss 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. @keyframes dot {
  2. 0% { width: 0; margin-right: 1em; }
  3. 100% { width: 1em; margin-right: 0; }
  4. }
  5. .demo-image {
  6. .block {
  7. padding: 30px 0;
  8. text-align: center;
  9. border-right: solid 1px #eff2f6;
  10. display: inline-block;
  11. width: 20%;
  12. box-sizing: border-box;
  13. vertical-align: top;
  14. &:last-child {
  15. border-right: none;
  16. }
  17. }
  18. .demonstration {
  19. display: block;
  20. color: #8492a6;
  21. font-size: 14px;
  22. margin-bottom: 20px;
  23. }
  24. }
  25. .demo-image__placeholder, .demo-image__error {
  26. @extend .demo-image;
  27. .block {
  28. width: 49%;
  29. }
  30. .el-image {
  31. width: 300px;
  32. height: 200px;
  33. }
  34. .image-slot {
  35. display: flex;
  36. justify-content: center;
  37. align-items: center;
  38. width: 100%;
  39. height: 100%;
  40. background: #f5f7fa;
  41. color: #909399;
  42. font-size: 14px;
  43. }
  44. }
  45. .demo-image__placeholder {
  46. .dot {
  47. animation: dot 2s infinite steps(3, start);
  48. overflow: hidden;
  49. }
  50. }
  51. .demo-image__error {
  52. .image-slot {
  53. font-size: 30px;
  54. }
  55. }
  56. .demo-image__lazy {
  57. height: 400px;
  58. overflow-y: auto;
  59. .el-image {
  60. display: block;
  61. min-height: 200px;
  62. margin-bottom: 10px;
  63. &:last-child {
  64. margin-bottom: 0;
  65. }
  66. }
  67. }