index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873
  1. <template>
  2. <div class="container">
  3. <template v-if="notWebgl">
  4. <div class="css-animation">
  5. <div class="blue-bg">
  6. <span class="phone"></span>
  7. <span class="goods"></span>
  8. <span class="nut"></span>
  9. <span class="people"></span>
  10. <span class="flower">
  11. <span class="leaf_2"></span>
  12. <span class="leaf_1"></span>
  13. <span class="leaf_4"></span>
  14. <span class="leaf_3"></span>
  15. <span class="flowerpot"></span>
  16. </span>
  17. <span class="fengche"></span>
  18. </div>
  19. </div>
  20. </template>
  21. <template v-else>
  22. <canvas id="output"></canvas>
  23. </template>
  24. <div class="wrapper">
  25. <div class="header">
  26. <span class="logo">NUTUI
  27. <s></s>
  28. </span>
  29. <search/>
  30. <div class="menu">
  31. <ul>
  32. <li>
  33. <a href="#/doc">指南</a>
  34. </li>
  35. <li>
  36. <a href="#/ActionSheet">组件</a>
  37. </li>
  38. <li>
  39. <a href="/demo.html#/index" class="qrcode top-qr" target="_blank">示例
  40. <a>
  41. <span>请使用手机扫码体验</span>
  42. <img
  43. src="http://img13.360buyimg.com/uba/jfs/t1/14144/37/3433/5890/5c26d976E7cd98b80/94583409233081cc.png"
  44. alt
  45. >
  46. </a>
  47. </a>
  48. </li>
  49. </ul>
  50. <select @change="openwindow">
  51. <option value="2">2.X</option>
  52. <option value="1">1.X</option>
  53. </select>
  54. <a href="https://github.com/jdf2e/nutui" title="Github" target="_blank" class="github-icon">github</a>
  55. </div>
  56. </div>
  57. <div class="content">
  58. <div class="mouseDiv" id="mouseDiv"></div>
  59. <p class="title">NutUI</p>
  60. <p class="sub-title">一套轻量级移动端Vue / 微信小程序组件库</p>
  61. <a href="#/doc" class="blue-btn">开始使用</a>
  62. <a href="javascript:;" class="qrcode btn">
  63. 扫码体验
  64. <a>
  65. <span>请使用手机扫码体验</span>
  66. <img
  67. src="http://img13.360buyimg.com/uba/jfs/t1/14144/37/3433/5890/5c26d976E7cd98b80/94583409233081cc.png"
  68. alt
  69. >
  70. </a>
  71. </a>
  72. </div>
  73. </div>
  74. </div>
  75. </template>
  76. <script>
  77. import * as THREE from "three";
  78. import TWEEN from "@tweenjs/tween.js";
  79. import Detector from "./asset/js/Detector.js";
  80. import search from './search.vue';
  81. export default {
  82. name: "frontCover",
  83. data() {
  84. return {
  85. timer: null,
  86. notWebgl: true
  87. };
  88. },
  89. components:{
  90. search
  91. },
  92. methods: {
  93. openwindow(val) {
  94. if (val.target.value == 1) {
  95. window.location.href = " http://nutui.jd.com/1x/";
  96. }
  97. },
  98. threeAnimation() {
  99. this.timer = setTimeout(() => {
  100. //获取视窗宽高
  101. var mouseX = 0,
  102. mouseY = 0;
  103. var SCREEN_HEIGHT = window.innerHeight;
  104. var SCREEN_WIDTH = window.innerWidth;
  105. var tween;
  106. var planeObj = {
  107. x: 450,
  108. y: 80
  109. };
  110. //渲染器(render)
  111. var renderer = new THREE.WebGLRenderer({
  112. canvas: document.getElementById("output")
  113. });
  114. //设置背景颜色
  115. renderer.setClearColor(0xffffff, 1.0);
  116. renderer.setPixelRatio(window.devicePixelRatio);
  117. renderer.setSize(SCREEN_WIDTH, SCREEN_HEIGHT);
  118. //场景(Scene)
  119. var scene = new THREE.Scene();
  120. //透视投影相机
  121. var camera = new THREE.PerspectiveCamera(
  122. 45,
  123. SCREEN_WIDTH / SCREEN_HEIGHT,
  124. 1,
  125. 10000
  126. );
  127. camera.position.set(0, 0, 1300);
  128. camera.lookAt(scene.position);
  129. scene.add(camera);
  130. //光源
  131. var ambientLight = new THREE.AmbientLight("#468be8");
  132. scene.add(ambientLight);
  133. ambientLight.color.setHex(0xffffff);
  134. //背景蓝色
  135. var texture = new THREE.TextureLoader().load(
  136. "//img12.360buyimg.com/uba/jfs/t1/22824/40/3136/6504/5c24a3f4E76fdafde/802d02d1ec5d3d55.png"
  137. );
  138. var material = new THREE.MeshBasicMaterial({
  139. map: texture,
  140. transparent: true
  141. });
  142. var geometry = new THREE.PlaneBufferGeometry(1174, 923);
  143. //货物箱
  144. var texture1 = new THREE.TextureLoader().load(
  145. "//img14.360buyimg.com/uba/jfs/t1/21115/40/3224/5652/5c24a411E03ef9eb6/83781b97e59da905.png"
  146. );
  147. var material1 = new THREE.MeshBasicMaterial({
  148. map: texture1,
  149. transparent: true
  150. });
  151. var geometry1 = new THREE.PlaneBufferGeometry(146, 206);
  152. //人物
  153. var texture2 = new THREE.TextureLoader().load(
  154. "//img12.360buyimg.com/uba/jfs/t1/9330/16/10894/8662/5c24a42aE708692b3/14455d20eca1ccee.png"
  155. );
  156. var material2 = new THREE.MeshBasicMaterial({
  157. map: texture2,
  158. transparent: true
  159. });
  160. var geometry2 = new THREE.PlaneBufferGeometry(230, 417);
  161. //phone
  162. var texture3 = new THREE.TextureLoader().load(
  163. "//img10.360buyimg.com/uba/jfs/t1/19171/19/3175/23282/5c24a440Ee2a94261/45321aeaf173f237.png"
  164. );
  165. var material3 = new THREE.MeshBasicMaterial({
  166. map: texture3,
  167. transparent: true
  168. });
  169. var geometry3 = new THREE.PlaneBufferGeometry(284, 524);
  170. //flower
  171. var texture4 = new THREE.TextureLoader().load(
  172. "//img13.360buyimg.com/uba/jfs/t1/20972/11/3212/7155/5c24a45aE356f126d/2649726673daddc8.png"
  173. );
  174. var material4 = new THREE.MeshBasicMaterial({
  175. map: texture4,
  176. transparent: true
  177. });
  178. var geometry4 = new THREE.PlaneBufferGeometry(257, 193);
  179. //nut
  180. var texture5 = new THREE.TextureLoader().load(
  181. "//img14.360buyimg.com/uba/jfs/t1/21247/15/3196/859/5c24a472E1e9853ab/6bec8c6940288bc3.png"
  182. );
  183. var material5 = new THREE.MeshPhongMaterial({
  184. map: texture5,
  185. transparent: true,
  186. opacity: 1
  187. });
  188. var geometry5 = new THREE.PlaneBufferGeometry(57, 57);
  189. //fly
  190. var texture6 = new THREE.TextureLoader().load(
  191. "//img14.360buyimg.com/uba/jfs/t1/7300/6/10801/16348/5c24a487E98a8139b/27b70ff5b4ddaf1f.png"
  192. );
  193. var material6 = new THREE.MeshBasicMaterial({
  194. map: texture6,
  195. transparent: true,
  196. opacity: 0
  197. });
  198. var geometry6 = new THREE.PlaneBufferGeometry(851, 597);
  199. //flyContents
  200. var fly_texture_1_1 = new THREE.TextureLoader().load(
  201. "//img14.360buyimg.com/uba/jfs/t1/24669/35/3260/1611/5c24a4a9E4e0941ab/65a238650812a7a9.png"
  202. );
  203. var fly_materila_1_1 = new THREE.MeshBasicMaterial({
  204. map: fly_texture_1_1,
  205. transparent: true,
  206. opacity: 0
  207. });
  208. fly_materila_1_1.side = THREE.DoubleSide;
  209. var fly_geometry_1_1 = new THREE.PlaneBufferGeometry(77, 77);
  210. var fly_texture_1_2 = new THREE.TextureLoader().load(
  211. "//img10.360buyimg.com/uba/jfs/t1/16477/11/3111/645/5c24a4beE3668b9c1/f7f0b074baab071c.png"
  212. );
  213. var fly_materila_1_2 = new THREE.MeshBasicMaterial({
  214. map: fly_texture_1_2,
  215. transparent: true,
  216. opacity: 0
  217. });
  218. fly_materila_1_2.side = THREE.DoubleSide;
  219. var fly_geometry_1_2 = new THREE.PlaneBufferGeometry(54, 45);
  220. var fly_texture_2_1 = new THREE.TextureLoader().load(
  221. "//img12.360buyimg.com/uba/jfs/t1/8267/36/10934/1385/5c24a4d2E036f7ef1/d88f41ccd8d8f409.png"
  222. );
  223. var fly_materila_2_1 = new THREE.MeshBasicMaterial({
  224. map: fly_texture_2_1,
  225. transparent: true,
  226. opacity: 0
  227. });
  228. fly_materila_2_1.side = THREE.DoubleSide;
  229. var fly_geometry_2_1 = new THREE.PlaneBufferGeometry(103, 74);
  230. var fly_texture_2_2 = new THREE.TextureLoader().load(
  231. "//img20.360buyimg.com/uba/jfs/t1/9695/33/10662/1607/5c24a4e4Ee2f9bab1/18c829d3e46efc4e.png"
  232. );
  233. var fly_materila_2_2 = new THREE.MeshBasicMaterial({
  234. map: fly_texture_2_2,
  235. transparent: true,
  236. opacity: 0
  237. });
  238. fly_materila_2_2.side = THREE.DoubleSide;
  239. var fly_geometry_2_2 = new THREE.PlaneBufferGeometry(69, 79);
  240. var fly_texture_3_1 = new THREE.TextureLoader().load(
  241. "//img12.360buyimg.com/uba/jfs/t1/27128/26/3128/1206/5c24a4faEb2c39e88/825abcfc5fc19761.png"
  242. );
  243. var fly_materila_3_1 = new THREE.MeshBasicMaterial({
  244. map: fly_texture_3_1,
  245. transparent: true,
  246. opacity: 0
  247. });
  248. fly_materila_3_1.side = THREE.DoubleSide;
  249. var fly_geometry_3_1 = new THREE.PlaneBufferGeometry(52, 53);
  250. var fly_texture_3_2 = new THREE.TextureLoader().load(
  251. "//img12.360buyimg.com/uba/jfs/t1/29872/1/3250/1154/5c24a50eE15e06d48/2412d3d556bf7463.png"
  252. );
  253. var fly_materila_3_2 = new THREE.MeshBasicMaterial({
  254. map: fly_texture_3_2,
  255. transparent: true,
  256. opacity: 0
  257. });
  258. fly_materila_3_2.side = THREE.DoubleSide;
  259. var fly_geometry_3_2 = new THREE.PlaneBufferGeometry(73, 73);
  260. var plane = new THREE.Mesh(geometry, material);
  261. plane.position.x = 450;
  262. plane.position.y = 80;
  263. scene.add(plane);
  264. var plane1 = new THREE.Mesh(geometry1, material1);
  265. plane1.position.x = 220;
  266. plane1.position.y = -170;
  267. scene.add(plane1);
  268. var plane3 = new THREE.Mesh(geometry3, material3);
  269. plane3.position.x = 570;
  270. plane3.position.y = -12;
  271. scene.add(plane3);
  272. var plane5 = new THREE.Mesh(geometry5, material5);
  273. plane5.position.x = 505;
  274. plane5.position.y = 147;
  275. scene.add(plane5);
  276. var plane2 = new THREE.Mesh(geometry2, material2);
  277. plane2.position.x = 420;
  278. plane2.position.y = -65;
  279. scene.add(plane2);
  280. var plane4 = new THREE.Mesh(geometry4, material4);
  281. plane4.position.x = 770;
  282. plane4.position.y = -175;
  283. scene.add(plane4);
  284. var plane6 = new THREE.Mesh(geometry6, material6);
  285. plane6.position.x = 498;
  286. plane6.position.y = 23;
  287. scene.add(plane6);
  288. var planeFly_1_1 = new THREE.Mesh(fly_geometry_1_1, fly_materila_1_1);
  289. planeFly_1_1.position.x = 305;
  290. planeFly_1_1.position.y = 220;
  291. scene.add(planeFly_1_1);
  292. var planeFly_1_2 = new THREE.Mesh(fly_geometry_1_2, fly_materila_1_2);
  293. planeFly_1_2.position.x = 385;
  294. planeFly_1_2.position.y = 225;
  295. scene.add(planeFly_1_2);
  296. var planeFly_2_1 = new THREE.Mesh(fly_geometry_2_1, fly_materila_2_1);
  297. planeFly_2_1.position.x = 770;
  298. planeFly_2_1.position.y = 20;
  299. scene.add(planeFly_2_1);
  300. var planeFly_2_2 = new THREE.Mesh(fly_geometry_2_2, fly_materila_2_2);
  301. planeFly_2_2.position.x = 820;
  302. planeFly_2_2.position.y = 90;
  303. scene.add(planeFly_2_2);
  304. var planeFly_3_1 = new THREE.Mesh(fly_geometry_3_1, fly_materila_3_1);
  305. planeFly_3_1.position.x = 500;
  306. planeFly_3_1.position.y = -130;
  307. scene.add(planeFly_3_1);
  308. var planeFly_3_2 = new THREE.Mesh(fly_geometry_3_2, fly_materila_3_2);
  309. planeFly_3_2.position.x = 350;
  310. planeFly_3_2.position.y = -200;
  311. scene.add(planeFly_3_2);
  312. var flyTweenParams = {
  313. x: 565,
  314. y: 147,
  315. op: 0,
  316. r: 70,
  317. g: 139,
  318. b: 232
  319. };
  320. var flyTween = new TWEEN.Tween(flyTweenParams)
  321. .easing(TWEEN.Easing.Quadratic.Out)
  322. .to({ x: 505, y: 147, op: 1, r: 255, g: 255, b: 255 }, 3000)
  323. .onUpdate(function(p) {
  324. plane5.position.x = p.x;
  325. plane5.position.y = p.y;
  326. material5.opacity = p.op;
  327. ambientLight.color.setRGB(p.r / 255, p.g / 255, p.b / 255);
  328. })
  329. .start();
  330. var flyTweenBack = new TWEEN.Tween(flyTweenParams)
  331. .easing(TWEEN.Easing.Quadratic.Out)
  332. .to({ x: 565, y: 147, op: 0, r: 70, g: 139, b: 232 }, 3000)
  333. .onUpdate(function(p) {
  334. plane5.position.x = p.x;
  335. plane5.position.y = p.y;
  336. material5.opacity = p.op;
  337. ambientLight.color.setRGB(p.r / 255, p.g / 255, p.b / 255);
  338. });
  339. var flyContentsOp = {
  340. op: 0
  341. };
  342. var flyContentTween = new TWEEN.Tween(flyContentsOp)
  343. .easing(TWEEN.Easing.Quadratic.Out)
  344. .to({ op: 1 }, 2500)
  345. .onUpdate(function(p) {
  346. fly_materila_1_1.opacity = fly_materila_1_2.opacity = fly_materila_2_1.opacity = fly_materila_2_2.opacity = fly_materila_3_1.opacity = fly_materila_3_2.opacity = material6.opacity =
  347. p.op;
  348. });
  349. var flyContentTweenBack = new TWEEN.Tween(flyContentsOp)
  350. .easing(TWEEN.Easing.Quadratic.Out)
  351. .to({ op: 0 }, 2000)
  352. .onUpdate(function(p) {
  353. fly_materila_1_1.opacity = fly_materila_1_2.opacity = fly_materila_2_1.opacity = fly_materila_2_2.opacity = fly_materila_3_1.opacity = fly_materila_3_2.opacity = material6.opacity =
  354. p.op;
  355. });
  356. flyTween.chain(flyContentTween);
  357. //flyContentTween.chain(flyTween);
  358. flyContentTween.chain(flyContentTweenBack);
  359. flyContentTweenBack.chain(flyTweenBack);
  360. flyTweenBack.chain(flyTween);
  361. //flyContentTweenBack.chain(flyContentTween);
  362. //监听事件
  363. document
  364. .querySelector("#mouseDiv")
  365. .addEventListener("mousemove", onDocumentMouseMove, false);
  366. window.addEventListener("resize", onWindowResize, false);
  367. var timer = null;
  368. function onWindowResize(event) {
  369. SCREEN_HEIGHT = window.innerHeight;
  370. SCREEN_WIDTH = window.innerWidth;
  371. camera.aspect = SCREEN_WIDTH / SCREEN_HEIGHT;
  372. camera.updateProjectionMatrix();
  373. renderer.setSize(SCREEN_WIDTH, SCREEN_HEIGHT);
  374. }
  375. function onDocumentMouseMove(event) {
  376. clearTimeout(timer);
  377. timer = setTimeout(function() {
  378. if (tween) {
  379. tween.stop();
  380. }
  381. if (event.clientX - mouseX > 100) {
  382. tween = new TWEEN.Tween(planeObj)
  383. .easing(TWEEN.Easing.Quadratic.Out)
  384. .to({ x: 520, y: 150 }, 1000)
  385. .onUpdate(function(p) {
  386. plane.position.x = p.x;
  387. plane.position.y = p.y;
  388. })
  389. .start();
  390. } else if (event.clientX - mouseX < -100) {
  391. tween = new TWEEN.Tween(planeObj)
  392. .easing(TWEEN.Easing.Quadratic.Out)
  393. .to({ x: 450, y: 80 }, 1000)
  394. .onUpdate(function(p) {
  395. plane.position.x = p.x;
  396. plane.position.y = p.y;
  397. })
  398. .start();
  399. }
  400. tween.start();
  401. mouseX = event.clientX;
  402. mouseY = event.clientY;
  403. }, 100);
  404. }
  405. function render() {
  406. var timer = Date.now() * 0.0001;
  407. requestAnimationFrame(render);
  408. TWEEN.update();
  409. //渲染,输出
  410. renderer.render(scene, camera);
  411. }
  412. render();
  413. });
  414. }
  415. },
  416. watch: {},
  417. computed: {},
  418. created() {},
  419. mounted() {
  420. this.$nextTick(() => {
  421. this.notWebgl = true;
  422. // if (!Detector.webgl) {
  423. // //Detector.addGetWebGLMessage();
  424. // } else {
  425. // this.notWebgl = false;
  426. // this.threeAnimation();
  427. // }
  428. });
  429. },
  430. destroyed() {}
  431. };
  432. </script>
  433. <style lang="scss" scoped>
  434. @keyframes fadeInLeft {
  435. from {
  436. opacity: 0;
  437. transform: translate3d(-100%,0,0);
  438. }
  439. to{
  440. opacity: 1;
  441. transform: translate3d(0,0,0);
  442. }
  443. }
  444. @keyframes leafShake {
  445. form,to{
  446. transform:rotate(0);
  447. transform-origin: bottom;
  448. }
  449. 20%,
  450. 60%{
  451. transform: rotate(2deg);
  452. transform-origin: bottom;
  453. }
  454. 40%,
  455. 80%{
  456. transform: rotate(-2deg);
  457. transform-origin: bottom;
  458. }
  459. }
  460. @keyframes fadeInRight {
  461. from {
  462. opacity: 0;
  463. transform: translate3d(100%,0,0);
  464. }
  465. to{
  466. opacity: 1;
  467. transform: translate3d(0,0,0);
  468. }
  469. }
  470. @keyframes fadeIn{
  471. from {
  472. opacity: 0;
  473. }
  474. to {
  475. opacity: 1;
  476. }
  477. }
  478. .container{
  479. position: relative;
  480. min-width:990px;
  481. }
  482. .wrapper {
  483. position: absolute;
  484. top: 0;
  485. right: 0;
  486. bottom: 0;
  487. left: 0;
  488. .header {
  489. top: 0;
  490. min-width: 990px;
  491. width: 100%;
  492. z-index: 999;
  493. height: 64px;
  494. display: flex;
  495. align-items:center;
  496. position: relative;
  497. }
  498. .menu {
  499. position: absolute;
  500. top: 0;
  501. right: 14%;
  502. width: 376px;
  503. font-size: 12px;
  504. li {
  505. float: left;
  506. width: 70px;
  507. text-align: center;
  508. height: 64px;
  509. line-height: 64px;
  510. cursor: pointer;
  511. color: #fff;
  512. & > a{
  513. display:block;
  514. height:100%;
  515. line-height: 64px;
  516. }
  517. a {
  518. color: #fff;
  519. text-decoration: none;
  520. }
  521. }
  522. select {
  523. width: 74px;
  524. height: 28px;
  525. margin-top: 18px;
  526. margin-left: 20px;
  527. font-size: 12px;
  528. }
  529. li:hover {
  530. border-bottom: 2px solid #fff;
  531. }
  532. .github-icon {
  533. display: inline-block;
  534. height: 26px;
  535. width: 26px;
  536. font-size: 0;
  537. background: url("./asset/css/i/github.png") 0 0 no-repeat;
  538. vertical-align: middle;
  539. position: relative;
  540. top: -1px;
  541. margin-left: 35px;
  542. cursor: pointer;
  543. }
  544. }
  545. .logo {
  546. height: 100%;
  547. line-height: 64px;
  548. float: left;
  549. width: 245px;
  550. font-size: 0;
  551. position: relative;
  552. s {
  553. background: url(./asset/css/i/nut.png) 0 0 no-repeat;
  554. background-size:contain;
  555. height: 46px;
  556. width: 120px;
  557. display: inline-block;
  558. position: absolute;
  559. top: 50%;
  560. left: 50px;
  561. margin-top: -23px;
  562. }
  563. }
  564. .search {
  565. margin: 20px 0;
  566. display: inline-block;
  567. border-left: 1px solid #d8d8d8;
  568. padding-left: 84px;
  569. position: relative;
  570. &:before {
  571. content: "";
  572. display: inline-block;
  573. background: url(./asset/css/i/search.png) 0 0 no-repeat;
  574. height: 22px;
  575. width: 22px;
  576. position: absolute;
  577. top: 50%;
  578. margin-top: -11px;
  579. left: 40px;
  580. }
  581. .search-input {
  582. border: none;
  583. height: 24px;
  584. line-height: 24px;
  585. font-size: 12px;
  586. outline: none;
  587. width: 200px;
  588. background: transparent;
  589. }
  590. }
  591. .content {
  592. padding: 250px 0 0 8.8%;
  593. z-index: 999;
  594. position: relative;
  595. .mouseDiv {
  596. height: 300px;
  597. width: 500px;
  598. //background:#ccc;
  599. position: absolute;
  600. top: 50%;
  601. left: 50%;
  602. margin-left: -250px;
  603. margin-top: -50px;
  604. }
  605. .title{
  606. font-size: 42px;
  607. color:#333;
  608. font-weight: bold;
  609. animation: fadeInLeft 1s both;
  610. }
  611. .sub-title{
  612. font-size:24px;
  613. color:#333;
  614. padding-top:30px;
  615. padding-bottom:100px;
  616. animation: fadeInLeft 1s both 0.5s;
  617. }
  618. .btn,.blue-btn{
  619. border:1px solid #5396ff;
  620. background:#fff;
  621. color:#5396ff;
  622. width:130px;
  623. height:40px;
  624. line-height:40px;
  625. text-align: center;
  626. display: inline-block;
  627. font-size:14px;
  628. text-decoration: none;
  629. border-radius: 20px;
  630. animation: fadeInLeft 1s both 1.2s;
  631. }
  632. .blue-btn {
  633. color: #fff;
  634. background: #5396ff;
  635. margin-right: 40px;
  636. }
  637. }
  638. .qrcode {
  639. background: none;
  640. width: auto;
  641. margin: 0;
  642. opacity: 1;
  643. &.top-qr {
  644. a {
  645. left: -65px;
  646. top:60px;
  647. }
  648. }
  649. a {
  650. position: absolute; //display: none;
  651. top: 44px;
  652. width: 200px;
  653. height: 240px;
  654. transform: scale(0.5);
  655. transform-origin: 50% top 0;
  656. transition: all 100ms ease-in-out 50ms;
  657. background: url("./asset/css/i/kuang.png") no-repeat;
  658. background-size: 200px;
  659. text-decoration: none;
  660. font-style: normal;
  661. text-align: center;
  662. left: -35px;
  663. overflow: hidden;
  664. pointer-events: none;
  665. span {
  666. display: block;
  667. overflow: hidden;
  668. color: #666;
  669. font-size: 14px;
  670. text-align: center;
  671. height: 45px;
  672. width: 100%;
  673. line-height: 60px;
  674. }
  675. img {
  676. opacity: 0.8;
  677. width: 166px;
  678. height: 166px;
  679. }
  680. }
  681. &:hover {
  682. opacity: 1;
  683. a {
  684. display: inline-block;
  685. opacity: 1;
  686. transform: scale(1);
  687. }
  688. }
  689. }
  690. }
  691. .css-animation{
  692. position: absolute;
  693. top:0;
  694. right:0;
  695. transform: scale3d(1.06,1.06,1.06);
  696. .blue-bg{
  697. background:url('//img12.360buyimg.com/uba/jfs/t1/22824/40/3136/6504/5c24a3f4E76fdafde/802d02d1ec5d3d55.png') 0 0 no-repeat;
  698. height:757px;
  699. width:963px;
  700. background-size:100% 100%;
  701. position: absolute;
  702. right:0;
  703. top:0;
  704. .phone{
  705. background:url('//img10.360buyimg.com/uba/jfs/t1/19171/19/3175/23282/5c24a440Ee2a94261/45321aeaf173f237.png') 0 0 no-repeat;
  706. height:419px;
  707. width:227px;
  708. background-size:100% 100%;
  709. position:absolute;
  710. right:350px;
  711. top:250px;
  712. display: inline-block;
  713. }
  714. .goods{
  715. background:url('//img14.360buyimg.com/uba/jfs/t1/21115/40/3224/5652/5c24a411E03ef9eb6/83781b97e59da905.png') 0 0 no-repeat;
  716. height:165px;
  717. width:117px;
  718. background-size:100% 100%;
  719. position:absolute;
  720. display:inline-block;
  721. top:500px;
  722. right:710px;
  723. }
  724. .people{
  725. background:url('//img12.360buyimg.com/uba/jfs/t1/9330/16/10894/8662/5c24a42aE708692b3/14455d20eca1ccee.png');
  726. width:184px;
  727. height:334px;
  728. background-size:100% 100%;
  729. position:absolute;
  730. top:334px;
  731. right:500px;
  732. }
  733. .flower{
  734. position: absolute;
  735. right:195px;
  736. top:510px;
  737. height:160px;
  738. width:208px;
  739. .leaf_1{
  740. position: absolute;
  741. background:url(./asset/css/i/leaf_1.png) 0 0 no-repeat;
  742. height:113px;
  743. width:60px;
  744. background-size:100% 100%;
  745. bottom:36px;
  746. right:79px;
  747. animation:leafShake 8s infinite ;
  748. }
  749. .leaf_2{
  750. position: absolute;
  751. background:url(./asset/css/i/leaf_2.png) 0 0 no-repeat;
  752. height:64px;
  753. width:66px;
  754. background-size:100% 100%;
  755. bottom:36px;
  756. right:35px;
  757. animation:leafShake 8s infinite 0.6s;
  758. }
  759. .leaf_3{
  760. position: absolute;
  761. background:url(./asset/css/i/leaf_3.png) 0 0 no-repeat;
  762. height:28px;
  763. width:64px;
  764. background-size:100% 100%;
  765. bottom:38px;
  766. right:42px;
  767. //animation:leafShake 3s infinite 0.5s;
  768. }
  769. .leaf_4{
  770. position: absolute;
  771. background:url(./asset/css/i/leaf_4.png) 0 0 no-repeat;
  772. height:113px;
  773. width:99px;
  774. background-size:100% 100%;
  775. bottom:38px;
  776. left:2px;
  777. //animation:leafShake 3s infinite 0.2s;
  778. }
  779. .flowerpot{
  780. position: absolute;
  781. background:url(./asset/css/i/flowerpot.png) 0 0 no-repeat;
  782. height:42px;
  783. width:130px;
  784. bottom:0;
  785. right:5px;
  786. background-size:100% 100%;
  787. }
  788. }
  789. .nut{
  790. position: absolute;
  791. height:46px;
  792. width:46px;
  793. background:url(./asset/css/i/nut-icon.png) 0 0 no-repeat;
  794. background-size:100% 100%;
  795. top:308px;
  796. right:493px;
  797. animation:fadeInRight 2s both;
  798. }
  799. .fengche{
  800. position:absolute;
  801. background:url(./asset/css/i/fengche.png) 0 0 no-repeat;
  802. background-size:100% 100%;
  803. width:679px;
  804. height:476px;
  805. top:195px;
  806. right:180px;
  807. animation: fadeIn 1s both 2s;
  808. }
  809. }
  810. }
  811. </style>