index.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944
  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. }
  509. .wrapper {
  510. position: absolute;
  511. top: 0;
  512. right: 0;
  513. bottom: 0;
  514. left: 0;
  515. .header {
  516. top: 0;
  517. min-width: 990px;
  518. width: 100%;
  519. height: 64px;
  520. display: flex;
  521. align-items: center;
  522. position: relative;
  523. }
  524. .menu {
  525. position: absolute;
  526. top: 0;
  527. right: 14%;
  528. width: 376px;
  529. font-size: 12px;
  530. li {
  531. float: left;
  532. width: 70px;
  533. text-align: center;
  534. height: 64px;
  535. line-height: 64px;
  536. cursor: pointer;
  537. color: #fff;
  538. position: relative;
  539. & > a {
  540. display: block;
  541. height: 100%;
  542. line-height: 64px;
  543. }
  544. a {
  545. color: #fff;
  546. text-decoration: none;
  547. }
  548. }
  549. select {
  550. width: 74px;
  551. height: 28px;
  552. margin-top: 18px;
  553. margin-left: 20px;
  554. font-size: 12px;
  555. }
  556. li::before {
  557. content: "";
  558. position: absolute;
  559. top: 0;
  560. left: 100%;
  561. width: 0;
  562. height: 100%;
  563. border-bottom: 2px solid #fff;
  564. transition: 0.2s all linear;
  565. }
  566. li:hover:before {
  567. width: 100%;
  568. top: 0;
  569. left: 0;
  570. transition-delay: 0.1s;
  571. border-bottom-color: #fff;
  572. z-index: -1;
  573. }
  574. li:hover ~ li::before {
  575. left: 0;
  576. }
  577. .github-icon {
  578. display: inline-block;
  579. height: 26px;
  580. width: 26px;
  581. font-size: 0;
  582. 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")
  583. no-repeat;
  584. vertical-align: middle;
  585. position: relative;
  586. top: -1px;
  587. margin-left: 35px;
  588. cursor: pointer;
  589. &:hover,
  590. &:active {
  591. opacity: 0.7;
  592. }
  593. }
  594. }
  595. .logo {
  596. height: 100%;
  597. line-height: 64px;
  598. float: left;
  599. width: 245px;
  600. font-size: 0;
  601. position: relative;
  602. s {
  603. background: url(./asset/css/i/nut.png) 0 0 no-repeat;
  604. background-size: contain;
  605. height: 46px;
  606. width: 120px;
  607. display: inline-block;
  608. position: absolute;
  609. top: 50%;
  610. left: 50px;
  611. margin-top: -23px;
  612. }
  613. }
  614. .search {
  615. margin: 20px 0;
  616. display: inline-block;
  617. border-left: 1px solid #d8d8d8;
  618. padding-left: 84px;
  619. position: relative;
  620. &:before {
  621. content: "";
  622. display: inline-block;
  623. background: url(./asset/css/i/search.png) 0 0 no-repeat;
  624. height: 22px;
  625. width: 22px;
  626. position: absolute;
  627. top: 50%;
  628. margin-top: -11px;
  629. left: 40px;
  630. }
  631. .search-input {
  632. border: none;
  633. height: 24px;
  634. line-height: 24px;
  635. font-size: 12px;
  636. outline: none;
  637. width: 200px;
  638. background: transparent;
  639. }
  640. }
  641. .content {
  642. padding: 15% 0 0 8.8%;
  643. z-index: 999;
  644. position: relative;
  645. .mouseDiv {
  646. height: 300px;
  647. width: 500px;
  648. //background:#ccc;
  649. position: absolute;
  650. top: 50%;
  651. left: 50%;
  652. margin-left: -250px;
  653. margin-top: -50px;
  654. }
  655. .title {
  656. font-size: 42px;
  657. color: #333;
  658. font-weight: bold;
  659. animation: fadeInLeft 1s both;
  660. }
  661. .sub-title {
  662. font-size: 24px;
  663. color: #333;
  664. padding-top: 30px;
  665. padding-bottom: 100px;
  666. animation: fadeInLeft 1s both 0.5s;
  667. }
  668. .btn,
  669. .blue-btn {
  670. border: 1px solid rgba(83, 150, 255, 1);
  671. background: #fff;
  672. color: rgba(83, 150, 255, 1);
  673. width: 130px;
  674. height: 40px;
  675. line-height: 40px;
  676. text-align: center;
  677. display: inline-block;
  678. font-size: 14px;
  679. text-decoration: none;
  680. border-radius: 20px;
  681. animation: fadeInLeft 1s both 1.2s;
  682. &:hover,
  683. &:active {
  684. border-color: rgba(83, 150, 255, 0.8);
  685. color: rgba(83, 150, 255, 0.8);
  686. }
  687. }
  688. .blue-btn {
  689. color: #fff;
  690. background: rgba(83, 150, 255, 1);
  691. margin-right: 40px;
  692. &:hover,
  693. &:active {
  694. background: rgba(83, 150, 255, 0.8);
  695. color: rgba(255, 255, 255, 0.8);
  696. }
  697. }
  698. }
  699. .qrcode {
  700. background: none;
  701. width: auto;
  702. margin: 0;
  703. opacity: 1;
  704. &.top-qr {
  705. a {
  706. left: -65px;
  707. top: 60px;
  708. }
  709. }
  710. a {
  711. position: absolute; //display: none;
  712. top: 44px;
  713. width: 200px;
  714. height: 240px;
  715. transform: scale(0.5);
  716. transform-origin: 50% top 0;
  717. transition: all 100ms ease-in-out 50ms;
  718. background: url("./asset/css/i/kuang.png") no-repeat;
  719. background-size: 200px;
  720. text-decoration: none;
  721. font-style: normal;
  722. text-align: center;
  723. left: -35px;
  724. overflow: hidden;
  725. pointer-events: none;
  726. span {
  727. display: block;
  728. overflow: hidden;
  729. color: #666;
  730. font-size: 14px;
  731. text-align: center;
  732. height: 45px;
  733. width: 100%;
  734. line-height: 60px;
  735. }
  736. img {
  737. opacity: 0.8;
  738. width: 166px;
  739. height: 166px;
  740. }
  741. }
  742. &:hover {
  743. opacity: 1;
  744. a {
  745. display: inline-block;
  746. opacity: 1;
  747. transform: scale(1);
  748. }
  749. }
  750. }
  751. }
  752. .css-animation {
  753. position: absolute;
  754. top: 0;
  755. right: 0;
  756. height: 757px;
  757. width: 963px;
  758. animation: fadeInRightAndTop 1.2s 1;
  759. transform: scale3d(1.06, 1.06, 1.06);
  760. .blue-bg {
  761. background: url("//img12.360buyimg.com/uba/jfs/t1/22824/40/3136/6504/5c24a3f4E76fdafde/802d02d1ec5d3d55.png")
  762. 0 0 no-repeat;
  763. height: 757px;
  764. width: 963px;
  765. background-size: 100% 100%;
  766. position: absolute;
  767. right: 0;
  768. top: 0;
  769. }
  770. .phone {
  771. background: url("//img10.360buyimg.com/uba/jfs/t1/19171/19/3175/23282/5c24a440Ee2a94261/45321aeaf173f237.png")
  772. 0 0 no-repeat;
  773. height: 419px;
  774. width: 227px;
  775. background-size: 100% 100%;
  776. position: absolute;
  777. right: 350px;
  778. top: 250px;
  779. display: inline-block;
  780. }
  781. .goods {
  782. background: url("//img14.360buyimg.com/uba/jfs/t1/21115/40/3224/5652/5c24a411E03ef9eb6/83781b97e59da905.png")
  783. 0 0 no-repeat;
  784. height: 165px;
  785. width: 117px;
  786. background-size: 100% 100%;
  787. position: absolute;
  788. display: inline-block;
  789. top: 500px;
  790. right: 710px;
  791. }
  792. .people {
  793. background: url("//img12.360buyimg.com/uba/jfs/t1/9330/16/10894/8662/5c24a42aE708692b3/14455d20eca1ccee.png");
  794. width: 184px;
  795. height: 334px;
  796. background-size: 100% 100%;
  797. position: absolute;
  798. top: 334px;
  799. right: 500px;
  800. }
  801. .flower {
  802. position: absolute;
  803. right: 195px;
  804. top: 510px;
  805. height: 160px;
  806. width: 208px;
  807. .leaf_1 {
  808. position: absolute;
  809. background: url(./asset/css/i/leaf_1.png) 0 0 no-repeat;
  810. height: 113px;
  811. width: 60px;
  812. background-size: 100% 100%;
  813. bottom: 36px;
  814. right: 79px;
  815. animation: leafShake 8s infinite;
  816. }
  817. .leaf_2 {
  818. position: absolute;
  819. background: url(./asset/css/i/leaf_2.png) 0 0 no-repeat;
  820. height: 64px;
  821. width: 66px;
  822. background-size: 100% 100%;
  823. bottom: 36px;
  824. right: 35px;
  825. animation: leafShake 8s infinite 0.6s;
  826. }
  827. .leaf_3 {
  828. position: absolute;
  829. background: url(./asset/css/i/leaf_3.png) 0 0 no-repeat;
  830. height: 28px;
  831. width: 64px;
  832. background-size: 100% 100%;
  833. bottom: 38px;
  834. right: 42px;
  835. //animation:leafShake 3s infinite 0.5s;
  836. }
  837. .leaf_4 {
  838. position: absolute;
  839. background: url(./asset/css/i/leaf_4.png) 0 0 no-repeat;
  840. height: 113px;
  841. width: 99px;
  842. background-size: 100% 100%;
  843. bottom: 38px;
  844. left: 2px;
  845. //animation:leafShake 3s infinite 0.2s;
  846. }
  847. .flowerpot {
  848. position: absolute;
  849. background: url(./asset/css/i/flowerpot.png) 0 0 no-repeat;
  850. height: 42px;
  851. width: 130px;
  852. bottom: 0;
  853. right: 5px;
  854. background-size: 100% 100%;
  855. }
  856. }
  857. .nut {
  858. position: absolute;
  859. height: 46px;
  860. width: 46px;
  861. background: url(./asset/css/i/nut-icon.png) 0 0 no-repeat;
  862. background-size: 100% 100%;
  863. top: 308px;
  864. right: 493px;
  865. animation: fadeInRight 2s both;
  866. }
  867. .fengche {
  868. position: absolute;
  869. background: url(./asset/css/i/fengche.png) 0 0 no-repeat;
  870. background-size: 100% 100%;
  871. width: 679px;
  872. height: 476px;
  873. top: 195px;
  874. right: 180px;
  875. animation: fadeIn 2s both 2s;
  876. }
  877. }
  878. @media screen and (max-width: 1500px) {
  879. .css-animation {
  880. .blue-bg {
  881. transform: translateX(155px);
  882. }
  883. }
  884. .wrapper {
  885. .content {
  886. padding-left: 5%;
  887. }
  888. .menu {
  889. right: 6%;
  890. }
  891. }
  892. }
  893. </style>