image.css 482 B

123456789101112131415161718192021222324252627282930313233
  1. uni-image {
  2. width: 320px;
  3. height: 240px;
  4. display: inline-block;
  5. overflow: hidden;
  6. position: relative;
  7. }
  8. uni-image[hidden] {
  9. display: none;
  10. }
  11. uni-image > div {
  12. width: 100%;
  13. height: 100%;
  14. background-repeat:no-repeat;
  15. }
  16. uni-image > img {
  17. -webkit-touch-callout: none;
  18. user-select: none;
  19. display: block;
  20. position: absolute;
  21. top: 0;
  22. left: 0;
  23. width: 100%;
  24. height: 100%;
  25. opacity: 0;
  26. }
  27. uni-image > .uni-image-will-change {
  28. will-change: transform;
  29. }