lg-video.css 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. .lg-outer .lg-video-cont {
  2. text-align: center;
  3. display: inline-block;
  4. vertical-align: middle;
  5. position: relative;
  6. }
  7. .lg-outer .lg-video-cont .lg-object {
  8. width: 100% !important;
  9. height: 100% !important;
  10. }
  11. .lg-outer .lg-has-iframe .lg-video-cont {
  12. -webkit-overflow-scrolling: touch;
  13. overflow: auto;
  14. }
  15. .lg-outer .lg-video-object {
  16. position: absolute;
  17. left: 0;
  18. right: 0;
  19. width: 100%;
  20. height: 100%;
  21. top: 0;
  22. bottom: 0;
  23. z-index: 3;
  24. }
  25. .lg-outer .lg-video-poster {
  26. z-index: 1;
  27. }
  28. .lg-outer .lg-has-video .lg-video-object {
  29. opacity: 0;
  30. will-change: opacity;
  31. -webkit-transition: opacity 0.3s ease-in;
  32. -o-transition: opacity 0.3s ease-in;
  33. transition: opacity 0.3s ease-in;
  34. }
  35. .lg-outer .lg-has-video.lg-video-loaded .lg-video-poster,
  36. .lg-outer .lg-has-video.lg-video-loaded .lg-video-play-button {
  37. opacity: 0 !important;
  38. }
  39. .lg-outer .lg-has-video.lg-video-loaded .lg-video-object {
  40. opacity: 1;
  41. }
  42. @keyframes lg-play-stroke {
  43. 0% {
  44. stroke-dasharray: 1, 200;
  45. stroke-dashoffset: 0;
  46. }
  47. 50% {
  48. stroke-dasharray: 89, 200;
  49. stroke-dashoffset: -35px;
  50. }
  51. 100% {
  52. stroke-dasharray: 89, 200;
  53. stroke-dashoffset: -124px;
  54. }
  55. }
  56. @keyframes lg-play-rotate {
  57. 100% {
  58. -webkit-transform: rotate(360deg);
  59. transform: rotate(360deg);
  60. }
  61. }
  62. .lg-video-play-button {
  63. width: 18%;
  64. max-width: 140px;
  65. position: absolute;
  66. top: 50%;
  67. left: 50%;
  68. z-index: 2;
  69. cursor: pointer;
  70. transform: translate(-50%, -50%) scale(1);
  71. will-change: opacity, transform;
  72. -webkit-transition: -webkit-transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s;
  73. -moz-transition: -moz-transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s;
  74. -o-transition: -o-transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s;
  75. transition: transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s;
  76. }
  77. .lg-video-play-button:hover .lg-video-play-icon-bg,
  78. .lg-video-play-button:hover .lg-video-play-icon {
  79. opacity: 1;
  80. }
  81. .lg-video-play-icon-bg {
  82. fill: none;
  83. stroke-width: 3%;
  84. stroke: #fcfcfc;
  85. opacity: 0.6;
  86. will-change: opacity;
  87. -webkit-transition: opacity 0.12s ease-in;
  88. -o-transition: opacity 0.12s ease-in;
  89. transition: opacity 0.12s ease-in;
  90. }
  91. .lg-video-play-icon-circle {
  92. position: absolute;
  93. top: 0;
  94. left: 0;
  95. bottom: 0;
  96. right: 0;
  97. fill: none;
  98. stroke-width: 3%;
  99. stroke: rgba(30, 30, 30, 0.9);
  100. stroke-opacity: 1;
  101. stroke-linecap: round;
  102. stroke-dasharray: 200;
  103. stroke-dashoffset: 200;
  104. }
  105. .lg-video-play-icon {
  106. position: absolute;
  107. width: 25%;
  108. max-width: 120px;
  109. left: 50%;
  110. top: 50%;
  111. transform: translate3d(-50%, -50%, 0);
  112. opacity: 0.6;
  113. will-change: opacity;
  114. -webkit-transition: opacity 0.12s ease-in;
  115. -o-transition: opacity 0.12s ease-in;
  116. transition: opacity 0.12s ease-in;
  117. }
  118. .lg-video-play-icon .lg-video-play-icon-inner {
  119. fill: #fcfcfc;
  120. }
  121. .lg-video-loading .lg-video-play-icon-circle {
  122. animation: lg-play-rotate 2s linear 0.25s infinite, lg-play-stroke 1.5s ease-in-out 0.25s infinite;
  123. }
  124. .lg-video-loaded .lg-video-play-button {
  125. opacity: 0;
  126. transform: translate(-50%, -50%) scale(0.7);
  127. }