index.vue 25 KB

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