windowAnimate.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <template>
  2. <view style="width: 100%; height: 100%">
  3. <div class="door-container">
  4. <div v-show="windowcount == 1">
  5. <div
  6. class="autowindow_new"
  7. v-show="windowcount == 1"
  8. :style="{ height: height }"
  9. style=" margin: 0 auto;"
  10. >
  11. <div
  12. class="window_new_1"
  13. :style="`transform: rotateX(${windowAngle}deg)`"
  14. id="subwindowpic11"
  15. ></div>
  16. <div
  17. class="window_new_2"
  18. :style="`transform: rotateX(${windowAngle}deg)`"
  19. id="subwindowpic12"
  20. ></div>
  21. <div
  22. class="window_new_3"
  23. :style="`transform: rotateX(${windowAngle}deg)`"
  24. id="subwindowpic13"
  25. ></div>
  26. <div
  27. class="window_new_4"
  28. :style="`transform: rotateX(${windowAngle}deg)`"
  29. id="subwindowpic14"
  30. ></div>
  31. <div
  32. class="window_new_5"
  33. :style="`transform: rotateX(${windowAngle}deg)`"
  34. id="subwindowpic15"
  35. ></div>
  36. </div>
  37. <div>
  38. <video controls style="width: 100%"></video>
  39. </div>
  40. </div>
  41. <div v-show="windowcount == 2">
  42. <div style="display: flex; flex-wrap: nowrap;">
  43. <div
  44. class="autowindow_new"
  45. :style="{ height: height }"
  46. >
  47. <div
  48. class="window_new_1"
  49. :style="`transform: rotateX(${windowAngle}deg)`"
  50. id="subwindowpic11"
  51. ></div>
  52. <div
  53. class="window_new_2"
  54. :style="`transform: rotateX(${windowAngle}deg)`"
  55. id="subwindowpic12"
  56. ></div>
  57. <div
  58. class="window_new_3"
  59. :style="`transform: rotateX(${windowAngle}deg)`"
  60. id="subwindowpic13"
  61. ></div>
  62. <div
  63. class="window_new_4"
  64. :style="`transform: rotateX(${windowAngle}deg)`"
  65. id="subwindowpic14"
  66. ></div>
  67. <div
  68. class="window_new_5"
  69. :style="`transform: rotateX(${windowAngle}deg)`"
  70. id="subwindowpic15"
  71. ></div>
  72. </div>
  73. <div
  74. class="autowindow_new"
  75. :style="{ height: height }"
  76. >
  77. <div
  78. class="window_new_1"
  79. :style="`transform: rotateX(${windowAngle1}deg)`"
  80. id="subwindowpic11"
  81. ></div>
  82. <div
  83. class="window_new_2"
  84. :style="`transform: rotateX(${windowAngle1}deg)`"
  85. id="subwindowpic12"
  86. ></div>
  87. <div
  88. class="window_new_3"
  89. :style="`transform: rotateX(${windowAngle1}deg)`"
  90. id="subwindowpic13"
  91. ></div>
  92. <div
  93. class="window_new_4"
  94. :style="`transform: rotateX(${windowAngle1}deg)`"
  95. id="subwindowpic14"
  96. ></div>
  97. <div
  98. class="window_new_5"
  99. :style="`transform: rotateX(${windowAngle1}deg)`"
  100. id="subwindowpic15"
  101. ></div>
  102. </div>
  103. </div>
  104. <div>
  105. <video controls style="width: 100%"></video>
  106. </div>
  107. </div>
  108. </div>
  109. </view>
  110. </template>
  111. <script>
  112. export default {
  113. data() {
  114. return {
  115. height: "200px",
  116. };
  117. },
  118. props: ["windowAngle", "windowAngle1", "windowcount"],
  119. methods: {},
  120. watch: {
  121. windownum(val) {
  122. if (val == 1) {
  123. this.height = "180px";
  124. }
  125. if (val == 2) {
  126. this.height = "180px";
  127. }
  128. },
  129. },
  130. onLoad(query) {},
  131. };
  132. </script>
  133. <style scoped>
  134. /*风窗样式*/
  135. div.autowindow_new {
  136. width: 50%;
  137. background-image: url(../../../../static/window/window-bk.png);
  138. background-size: 100% 100%;
  139. perspective: 800px;
  140. }
  141. /*风窗1 2 3 4*/
  142. div.window_new_1 {
  143. margin-top: 2%;
  144. margin-left: 4%;
  145. width: 92%;
  146. height: 15%;
  147. background-color: crimson;
  148. box-sizing: border-box;
  149. float: left;
  150. z-index: 1;
  151. transition: all 2s;
  152. background-image: url(../../../../static/window/window_new1.png);
  153. background-size: 100% 100%;
  154. }
  155. div.window_new_2 {
  156. margin-top: 1%;
  157. margin-left: 4%;
  158. width: 92%;
  159. height: 15%;
  160. background-color: crimson;
  161. box-sizing: border-box;
  162. float: left;
  163. z-index: 1;
  164. transition: all 2s;
  165. background-image: url(../../../../static/window/window_new1.png);
  166. background-size: 100% 100%;
  167. }
  168. div.window_new_3 {
  169. margin-top: 1%;
  170. margin-left: 4%;
  171. width: 92%;
  172. height: 15%;
  173. background-color: crimson;
  174. box-sizing: border-box;
  175. float: left;
  176. z-index: 1;
  177. transition: all 2s;
  178. background-image: url(../../../../static/window/window_new1.png);
  179. background-size: 100% 100%;
  180. }
  181. div.window_new_4 {
  182. margin-top: 1%;
  183. margin-left: 4%;
  184. width: 92%;
  185. height: 15%;
  186. background-color: crimson;
  187. box-sizing: border-box;
  188. float: left;
  189. z-index: 1;
  190. transition: all 2s;
  191. background-image: url(../../../../static/window/window_new1.png);
  192. background-size: 100% 100%;
  193. }
  194. div.window_new_5 {
  195. margin-top: 1%;
  196. margin-left: 4%;
  197. width: 92%;
  198. height: 15%;
  199. background-color: crimson;
  200. box-sizing: border-box;
  201. float: left;
  202. z-index: 1;
  203. transition: all 2s;
  204. background-image: url(../../../../static/window/window_new1.png);
  205. background-size: 100% 100%;
  206. }
  207. div.window_new_1 {
  208. transition: all 2s ease;
  209. transform-origin: center center;
  210. }
  211. div.window_new_2 {
  212. transition: all 2s ease;
  213. transform-origin: center center;
  214. }
  215. div.window_new_3 {
  216. transition: all 2s ease;
  217. transform-origin: center center;
  218. }
  219. div.window_new_4 {
  220. transition: all 2s ease;
  221. transform-origin: center center;
  222. }
  223. div.window_new_5 {
  224. transition: all 2s ease;
  225. transform-origin: center center;
  226. }
  227. .open {
  228. transform: rotateX(100deg);
  229. }
  230. .close {
  231. transform: rotateX(0deg);
  232. }
  233. /*使用css变形功能
  234. div.door:hover div.left_door{
  235. transform:rotateY(100deg);
  236. }
  237. div.door:hover div.right_door{
  238. transform:rotateY(-100deg);
  239. }*/
  240. </style>