index.vue 27 KB

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