跨年、元旦、除夕(前端HTML)

打印 上一主题 下一主题

主题 1029|帖子 1029|积分 3087

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
目录
效果展示:
操纵:
代码:


效果展示:


操纵:

打开记事本粘贴代码
生存后更改后缀为html
双击运行

代码:

  1. <!doctype html>
  2. <html lang="en">
  3.   <head>
  4.     <meta charset="utf-8">
  5.     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6.     <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0">
  7.     <title>新年快乐</title>
  8.   </head>
  9.   <body>
  10.     <canvas class="canvas"></canvas>
  11.     <div class="overlay">
  12.       <div class="tabs">
  13.         <div class="tabs-labels"><span class="tabs-label">Commands</span><span class="tabs-label">Info</span><span class="tabs-label">Share</span></div>
  14.         <div class="tabs-panels">
  15.           <ul class="tabs-panel commands">
  16.             <li class="commands-item"><span class="commands-item-title">Text</span><span class="commands-item-info" data-demo="Hello :)">Type anything</span><span class="commands-item-action">Demo</span></li>
  17.             <li class="commands-item"><span class="commands-item-title">Countdown</span><span class="commands-item-info" data-demo="#countdown 10">#countdown<span class="commands-item-mode">number</span></span><span class="commands-item-action">Demo</span></li>
  18.             <li class="commands-item"><span class="commands-item-title">Icon</span><span class="commands-item-info" data-demo="#icon thumbs-up">#icon<span class="commands-item-mode">name</span>&nbsp;(using <a href="//fortawesome.github.io/Font-Awesome/#icons-new" target="_blank">Font Awesome</a>)</span><span class="commands-item-action">Demo</span></li>
  19.             <li class="commands-item"><span class="commands-item-title">Time</span><span class="commands-item-info" data-demo="#time">#time</span><span class="commands-item-action">Demo</span></li>
  20.             <li class="commands-item"><span class="commands-item-title">Rectangle</span><span class="commands-item-info" data-demo="#rectangle 30x15">#rectangle<span class="commands-item-mode">width x height</span></span><span class="commands-item-action">Demo</span></li>
  21.             <li class="commands-item"><span class="commands-item-title">Circle</span><span class="commands-item-info" data-demo="#circle 25">#circle<span class="commands-item-mode">diameter</span></span><span class="commands-item-action">Demo</span></li>
  22.             <li class="commands-item commands-item--gap"><span class="commands-item-title">Animate</span><span class="commands-item-info" data-demo="The time is|#time|#countdown 3|#icon thumbs-up"><span class="commands-item-mode">command1</span>&nbsp;|<span class="commands-item-mode">command2</span></span><span class="commands-item-action">Demo</span></li>
  23.           </ul>
  24.           <div class="tabs-panel ui-details">
  25.             <div class="ui-details-content">
  26.             </div>
  27.           </div>
  28.         </div>
  29.       </div>
  30.     </div>
  31.     <audio src="http://music.163.com/song/media/outer/url?id=41667067.mp3" autoplay="autoplay"></audio>
  32. <script>
  33. var str_text='新年倒计时|五|四|三|二|一|2024|新年快乐!|我会一直在!'
  34. var S = {
  35.   init: function () {
  36.     var action = window.location.href,
  37.         i = action.indexOf('?a=');
  38.     S.Drawing.init('.canvas');
  39.     S.ShapeBuilder.init();
  40.     S.UI.init();
  41.     document.body.classList.add('body--ready');
  42.     if (i !== -1) {
  43.       S.UI.simulate(decodeURI(action).substring(i + 3));
  44.     } else {
  45.       S.UI.simulate(str_text);
  46.     }
  47.     S.Drawing.loop(function () {
  48.       S.Shape.render();
  49.     });
  50.   }
  51. };
  52. window.addEventListener('load', function () {
  53.   S.init();
  54. });
  55. S.Drawing = (function () {
  56.   var canvas,
  57.       context,
  58.       renderFn,
  59.       requestFrame = window.requestAnimationFrame       ||
  60.                      window.webkitRequestAnimationFrame ||
  61.                      window.mozRequestAnimationFrame    ||
  62.                      window.oRequestAnimationFrame      ||
  63.                      window.msRequestAnimationFrame     ||
  64.                      function (callback) {
  65.                         window.setTimeout(callback, 1000 / 60);
  66.                       };
  67.   return {
  68.     init: function (el) {
  69.       canvas = document.querySelector(el);
  70.       context = canvas.getContext('2d');
  71.       this.adjustCanvas();
  72.       window.addEventListener('resize', function () {
  73.         S.Drawing.adjustCanvas();
  74.       });
  75.     },
  76.     loop: function (fn) {
  77.       renderFn = !renderFn ? fn : renderFn;
  78.       this.clearFrame();
  79.       renderFn();
  80.       requestFrame.call(window, this.loop.bind(this));
  81.     },
  82.     adjustCanvas: function () {
  83.       canvas.width = window.innerWidth;
  84.       canvas.height = window.innerHeight;
  85.     },
  86.     clearFrame: function () {
  87.       context.clearRect(0, 0, canvas.width, canvas.height);
  88.     },
  89.     getArea: function () {
  90.       return { w: canvas.width, h: canvas.height };
  91.     },
  92.     drawCircle: function (p, c) {
  93.       context.fillStyle = c.render();
  94.       context.beginPath();
  95.       context.arc(p.x, p.y, p.z, 0, 2 * Math.PI, true);
  96.       context.closePath();
  97.       context.fill();
  98.     }
  99.   };
  100. }());
  101. S.Point = function (args) {
  102.   this.x = args.x;
  103.   this.y = args.y;
  104.   this.z = args.z;
  105.   this.a = args.a;
  106.   this.h = args.h;
  107. };
  108. S.Color = function (r, g, b, a) {
  109.   this.r = r;
  110.   this.g = g;
  111.   this.b = b;
  112.   this.a = a;
  113. };
  114. S.Color.prototype = {
  115.   render: function () {
  116.     return 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + this.a + ')';
  117.   }
  118. };
  119. S.UI = (function () {
  120.   var input = document.querySelector('.ui-input'),
  121.       ui = document.querySelector('.ui'),
  122.       help = document.querySelector('.help'),
  123.       commands = document.querySelector('.commands'),
  124.       overlay = document.querySelector('.overlay'),
  125.       canvas = document.querySelector('.canvas'),
  126.       interval,
  127.       isTouch = ('ontouchstart' in window || navigator.msMaxTouchPoints),
  128.       currentAction,
  129.       resizeTimer,
  130.       time,
  131.       maxShapeSize = 30,
  132.       firstAction = true,
  133.       sequence = [],
  134.       cmd = '#';
  135.   function formatTime(date) {
  136.     var h = date.getHours(),
  137.         m = date.getMinutes();
  138.     m = m < 10 ? '0' + m : m;
  139.     return h + ':' + m;
  140.   }
  141.   function getValue(value) {
  142.     return value && value.split(' ')[1];
  143.   }
  144.   function getAction(value) {
  145.     value = value && value.split(' ')[0];
  146.     return value && value[0] === cmd && value.substring(1);
  147.   }
  148.   function timedAction(fn, delay, max, reverse) {
  149.     clearInterval(interval);
  150.     currentAction = reverse ? max : 1;
  151.     fn(currentAction);
  152.     if (!max || (!reverse && currentAction < max) || (reverse && currentAction > 0)) {
  153.       interval = setInterval(function () {
  154.         currentAction = reverse ? currentAction - 1 : currentAction + 1;
  155.         fn(currentAction);
  156.         if ((!reverse && max && currentAction === max) || (reverse && currentAction === 0)) {
  157.           clearInterval(interval);
  158.         }
  159.       }, delay);
  160.     }
  161.   }
  162.   function reset(destroy) {
  163.     clearInterval(interval);
  164.     sequence = [];
  165.     time = null;
  166.     if (destroy) {
  167.       S.Shape.switchShape(S.ShapeBuilder.letter(''));
  168.     }
  169.   }
  170.   function performAction(value) {
  171.     var action,
  172.         current;
  173.     overlay.classList.remove('overlay--visible');
  174.     sequence = typeof(value) === 'object' ? value : sequence.concat(value.split('|'));
  175.     timedAction(function () {
  176.       current = sequence.shift();
  177.       action = getAction(current);
  178.       value = getValue(current);
  179.       switch (action) {
  180.       case 'countdown':
  181.         value = parseInt(value, 10) || 10;
  182.         value = value > 0 ? value : 10;
  183.         timedAction(function (index) {
  184.           if (index === 0) {
  185.             if (sequence.length === 0) {
  186.               S.Shape.switchShape(S.ShapeBuilder.letter(''));
  187.             } else {
  188.               performAction(sequence);
  189.             }
  190.           } else {
  191.             S.Shape.switchShape(S.ShapeBuilder.letter(index), true);
  192.           }
  193.         }, 1000, value, true);
  194.         break;
  195.       case 'rectangle':
  196.         value = value && value.split('x');
  197.         value = (value && value.length === 2) ? value : [maxShapeSize, maxShapeSize / 2];
  198.         S.Shape.switchShape(S.ShapeBuilder.rectangle(Math.min(maxShapeSize, parseInt(value[0], 10)), Math.min(maxShapeSize, parseInt(value[1], 10))));
  199.         break;
  200.       case 'circle':
  201.         value = parseInt(value, 10) || maxShapeSize;
  202.         value = Math.min(value, maxShapeSize);
  203.         S.Shape.switchShape(S.ShapeBuilder.circle(value));
  204.         break;
  205.       case 'time':
  206.         var t = formatTime(new Date());
  207.         if (sequence.length > 0) {
  208.           S.Shape.switchShape(S.ShapeBuilder.letter(t));
  209.         } else {
  210.           timedAction(function () {
  211.             t = formatTime(new Date());
  212.             if (t !== time) {
  213.               time = t;
  214.               S.Shape.switchShape(S.ShapeBuilder.letter(time));
  215.             }
  216.           }, 1000);
  217.         }
  218.         break;
  219.       case 'icon':
  220.         S.ShapeBuilder.imageFile('font-awesome/' + value + '.png', function (obj) {
  221.           S.Shape.switchShape(obj);
  222.         });
  223.         break;
  224.       default:
  225.         S.Shape.switchShape(S.ShapeBuilder.letter(current[0] === cmd ? 'What?' : current));
  226.       }
  227.     }, 2500, sequence.length);
  228.   }
  229.   return {
  230.     init: function () {
  231.    
  232.       if (isTouch) {
  233.         document.body.classList.add('touch');
  234.       }
  235.       S.UI.Tabs.init();
  236.     },
  237.     simulate: function (action) {
  238.       performAction(action);
  239.     }
  240.   };
  241. }());
  242. S.UI.Tabs = (function () {
  243.   var labels = document.querySelector('.tabs-labels'),
  244.       triggers = document.querySelectorAll('.tabs-label'),
  245.       panels = document.querySelectorAll('.tabs-panel');
  246.   function activate(i) {
  247.     triggers[i].classList.add('tabs-label--active');
  248.     panels[i].classList.add('tabs-panel--active');
  249.   }
  250.   function bindEvents() {
  251.     labels.addEventListener('click', function (e) {
  252.       var el = e.target,
  253.           index;
  254.       if (el.classList.contains('tabs-label')) {
  255.         for (var t = 0; t < triggers.length; t++) {
  256.           triggers[t].classList.remove('tabs-label--active');
  257.           panels[t].classList.remove('tabs-panel--active');
  258.           if (el === triggers[t]) {
  259.             index = t;
  260.           }
  261.         }
  262.         activate(index);
  263.       }
  264.     });
  265.   }
  266.   return {
  267.     init: function () {
  268.       activate(0);
  269.       bindEvents();
  270.     }
  271.   };
  272. }());
  273. S.Dot = function (x, y) {
  274.   this.p = new S.Point({
  275.     x: x,
  276.     y: y,
  277.     z: 5,
  278.     a: 1,
  279.     h: 0
  280.   });
  281.   this.e = 0.07;
  282.   this.s = true;
  283.   this.c = new S.Color(255, 255, 255, this.p.a);
  284.   this.t = this.clone();
  285.   this.q = [];
  286. };
  287. S.Dot.prototype = {
  288.   clone: function () {
  289.     return new S.Point({
  290.       x: this.x,
  291.       y: this.y,
  292.       z: this.z,
  293.       a: this.a,
  294.       h: this.h
  295.     });
  296.   },
  297.   _draw: function () {
  298.     this.c.a = this.p.a;
  299.     S.Drawing.drawCircle(this.p, this.c);
  300.   },
  301.   _moveTowards: function (n) {
  302.     var details = this.distanceTo(n, true),
  303.         dx = details[0],
  304.         dy = details[1],
  305.         d = details[2],
  306.         e = this.e * d;
  307.     if (this.p.h === -1) {
  308.       this.p.x = n.x;
  309.       this.p.y = n.y;
  310.       return true;
  311.     }
  312.     if (d > 1) {
  313.       this.p.x -= ((dx / d) * e);
  314.       this.p.y -= ((dy / d) * e);
  315.     } else {
  316.       if (this.p.h > 0) {
  317.         this.p.h--;
  318.       } else {
  319.         return true;
  320.       }
  321.     }
  322.     return false;
  323.   },
  324.   _update: function () {
  325.     var p,
  326.         d;
  327.     if (this._moveTowards(this.t)) {
  328.       p = this.q.shift();
  329.       if (p) {
  330.         this.t.x = p.x || this.p.x;
  331.         this.t.y = p.y || this.p.y;
  332.         this.t.z = p.z || this.p.z;
  333.         this.t.a = p.a || this.p.a;
  334.         this.p.h = p.h || 0;
  335.       } else {
  336.         if (this.s) {
  337.           this.p.x -= Math.sin(Math.random() * 3.142);
  338.           this.p.y -= Math.sin(Math.random() * 3.142);
  339.         } else {
  340.           this.move(new S.Point({
  341.             x: this.p.x + (Math.random() * 50) - 25,
  342.             y: this.p.y + (Math.random() * 50) - 25,
  343.           }));
  344.         }
  345.       }
  346.     }
  347.     d = this.p.a - this.t.a;
  348.     this.p.a = Math.max(0.1, this.p.a - (d * 0.05));
  349.     d = this.p.z - this.t.z;
  350.     this.p.z = Math.max(1, this.p.z - (d * 0.05));
  351.   },
  352.   distanceTo: function (n, details) {
  353.     var dx = this.p.x - n.x,
  354.         dy = this.p.y - n.y,
  355.         d = Math.sqrt(dx * dx + dy * dy);
  356.     return details ? [dx, dy, d] : d;
  357.   },
  358.   move: function (p, avoidStatic) {
  359.     if (!avoidStatic || (avoidStatic && this.distanceTo(p) > 1)) {
  360.       this.q.push(p);
  361.     }
  362.   },
  363.   render: function () {
  364.     this._update();
  365.     this._draw();
  366.   }
  367. };
  368. S.ShapeBuilder = (function () {
  369.   var gap = 13,
  370.       shapeCanvas = document.createElement('canvas'),
  371.       shapeContext = shapeCanvas.getContext('2d'),
  372.       fontSize = 500,
  373.       fontFamily = 'Avenir, Helvetica Neue, Helvetica, Arial, sans-serif';
  374.   function fit() {
  375.     shapeCanvas.width = Math.floor(window.innerWidth / gap) * gap;
  376.     shapeCanvas.height = Math.floor(window.innerHeight / gap) * gap;
  377.     shapeContext.fillStyle = 'red';
  378.     shapeContext.textBaseline = 'middle';
  379.     shapeContext.textAlign = 'center';
  380.   }
  381.   function processCanvas() {
  382.     var pixels = shapeContext.getImageData(0, 0, shapeCanvas.width, shapeCanvas.height).data,
  383.         dots = [],
  384.         x = 0,
  385.         y = 0,
  386.         fx = shapeCanvas.width,
  387.         fy = shapeCanvas.height,
  388.         w = 0,
  389.         h = 0;
  390.     for (var p = 0; p < pixels.length; p += (4 * gap)) {
  391.       if (pixels[p + 3] > 0) {
  392.         dots.push(new S.Point({
  393.           x: x,
  394.           y: y
  395.         }));
  396.         w = x > w ? x : w;
  397.         h = y > h ? y : h;
  398.         fx = x < fx ? x : fx;
  399.         fy = y < fy ? y : fy;
  400.       }
  401.       x += gap;
  402.       if (x >= shapeCanvas.width) {
  403.         x = 0;
  404.         y += gap;
  405.         p += gap * 4 * shapeCanvas.width;
  406.       }
  407.     }
  408.     return { dots: dots, w: w + fx, h: h + fy };
  409.   }
  410.   function setFontSize(s) {
  411.     shapeContext.font = 'bold ' + s + 'px ' + fontFamily;
  412.   }
  413.   function isNumber(n) {
  414.     return !isNaN(parseFloat(n)) && isFinite(n);
  415.   }
  416.   return {
  417.     init: function () {
  418.       fit();
  419.       window.addEventListener('resize', fit);
  420.     },
  421.     imageFile: function (url, callback) {
  422.       var image = new Image(),
  423.           a = S.Drawing.getArea();
  424.       image.onload = function () {
  425.         shapeContext.clearRect(0, 0, shapeCanvas.width, shapeCanvas.height);
  426.         shapeContext.drawImage(this, 0, 0, a.h * 0.6, a.h * 0.6);
  427.         callback(processCanvas());
  428.       };
  429.       image.onerror = function () {
  430.         callback(S.ShapeBuilder.letter('What?'));
  431.       };
  432.       image.src = url;
  433.     },
  434.     circle: function (d) {
  435.       var r = Math.max(0, d) / 2;
  436.       shapeContext.clearRect(0, 0, shapeCanvas.width, shapeCanvas.height);
  437.       shapeContext.beginPath();
  438.       shapeContext.arc(r * gap, r * gap, r * gap, 0, 2 * Math.PI, false);
  439.       shapeContext.fill();
  440.       shapeContext.closePath();
  441.       return processCanvas();
  442.     },
  443.     letter: function (l) {
  444.       var s = 0;
  445.       setFontSize(fontSize);
  446.       s = Math.min(fontSize,
  447.                   (shapeCanvas.width / shapeContext.measureText(l).width) * 0.8 * fontSize,
  448.                   (shapeCanvas.height / fontSize) * (isNumber(l) ? 1 : 0.45) * fontSize);
  449.       setFontSize(s);
  450.       shapeContext.clearRect(0, 0, shapeCanvas.width, shapeCanvas.height);
  451.       shapeContext.fillText(l, shapeCanvas.width / 2, shapeCanvas.height / 2);
  452.       return processCanvas();
  453.     },
  454.     rectangle: function (w, h) {
  455.       var dots = [],
  456.           width = gap * w,
  457.           height = gap * h;
  458.       for (var y = 0; y < height; y += gap) {
  459.         for (var x = 0; x < width; x += gap) {
  460.           dots.push(new S.Point({
  461.             x: x,
  462.             y: y,
  463.           }));
  464.         }
  465.       }
  466.       return { dots: dots, w: width, h: height };
  467.     }
  468.   };
  469. }());
  470. S.Shape = (function () {
  471.   var dots = [],
  472.       width = 0,
  473.       height = 0,
  474.       cx = 0,
  475.       cy = 0;
  476.   function compensate() {
  477.     var a = S.Drawing.getArea();
  478.     cx = a.w / 2 - width / 2;
  479.     cy = a.h / 2 - height / 2;
  480.   }
  481.   return {
  482.     shuffleIdle: function () {
  483.       var a = S.Drawing.getArea();
  484.       for (var d = 0; d < dots.length; d++) {
  485.         if (!dots[d].s) {
  486.           dots[d].move({
  487.             x: Math.random() * a.w,
  488.             y: Math.random() * a.h
  489.           });
  490.         }
  491.       }
  492.     },
  493.     switchShape: function (n, fast) {
  494.       var size,
  495.           a = S.Drawing.getArea(),
  496.           d = 0,
  497.           i = 0;
  498.       width = n.w;
  499.       height = n.h;
  500.       compensate();
  501.       if (n.dots.length > dots.length) {
  502.         size = n.dots.length - dots.length;
  503.         for (d = 1; d <= size; d++) {
  504.           dots.push(new S.Dot(a.w / 2, a.h / 2));
  505.         }
  506.       }
  507.       d = 0;
  508.       while (n.dots.length > 0) {
  509.         i = Math.floor(Math.random() * n.dots.length);
  510.         dots[d].e = fast ? 0.25 : (dots[d].s ? 0.14 : 0.11);
  511.         if (dots[d].s) {
  512.           dots[d].move(new S.Point({
  513.             z: Math.random() * 20 + 10,
  514.             a: Math.random(),
  515.             h: 18
  516.           }));
  517.         } else {
  518.           dots[d].move(new S.Point({
  519.             z: Math.random() * 5 + 5,
  520.             h: fast ? 18 : 30
  521.           }));
  522.         }
  523.         dots[d].s = true;
  524.         dots[d].move(new S.Point({
  525.           x: n.dots[i].x + cx,
  526.           y: n.dots[i].y + cy,
  527.           a: 1,
  528.           z: 5,
  529.           h: 0
  530.         }));
  531.         n.dots = n.dots.slice(0, i).concat(n.dots.slice(i + 1));
  532.         d++;
  533.       }
  534.       for (i = d; i < dots.length; i++) {
  535.         if (dots[i].s) {
  536.           dots[i].move(new S.Point({
  537.             z: Math.random() * 20 + 10,
  538.             a: Math.random(),
  539.             h: 20
  540.           }));
  541.           dots[i].s = false;
  542.           dots[i].e = 0.04;
  543.           dots[i].move(new S.Point({
  544.             x: Math.random() * a.w,
  545.             y: Math.random() * a.h,
  546.             a: 0.3, //.4
  547.             z: Math.random() * 4,
  548.             h: 0
  549.           }));
  550.         }
  551.       }
  552.     },
  553.     render: function () {
  554.       for (var d = 0; d < dots.length; d++) {
  555.         dots[d].render();
  556.       }
  557.     }
  558.   };
  559. }());
  560. </script>
  561.   </body>
  562.   <style>
  563.     /*! shape-shifter 2013-08-14 */
  564. /*! normalize.css v2.0.1 | MIT License | git.io/normalize */
  565. article,
  566. aside,
  567. details,
  568. figcaption,
  569. figure,
  570. footer,
  571. header,
  572. hgroup,
  573. nav,
  574. section,
  575. summary {
  576.     display: block
  577. }
  578. audio,
  579. canvas,
  580. video {
  581.     display: inline-block
  582. }
  583. audio:not([controls]) {
  584.     display: none;
  585.     height: 0
  586. }
  587. [hidden] {
  588.     display: none
  589. }
  590. html {
  591.     font-family: sans-serif;
  592.     -webkit-text-size-adjust: 100%;
  593.     -ms-text-size-adjust: 100%
  594. }
  595. body {
  596.     margin: 0
  597. }
  598. a:focus {
  599.     outline: thin dotted
  600. }
  601. a:active,
  602. a:hover {
  603.     outline: 0
  604. }
  605. h1 {
  606.     font-size: 2em
  607. }
  608. abbr[title] {
  609.     border-bottom: 1px dotted
  610. }
  611. b,
  612. strong {
  613.     font-weight: 700
  614. }
  615. dfn {
  616.     font-style: italic
  617. }
  618. mark {
  619.     background: #ff0;
  620.     color: #000
  621. }
  622. code,
  623. kbd,
  624. pre,
  625. samp {
  626.     font-family: monospace, serif;
  627.     font-size: 1em
  628. }
  629. pre {
  630.     white-space: pre;
  631.     white-space: pre-wrap;
  632.     word-wrap: break-word
  633. }
  634. q {
  635.     quotes: "\201C" "\201D" "\2018" "\2019"
  636. }
  637. small {
  638.     font-size: 80%
  639. }
  640. sub,
  641. sup {
  642.     font-size: 75%;
  643.     line-height: 0;
  644.     position: relative;
  645.     vertical-align: baseline
  646. }
  647. sup {
  648.     top: -.5em
  649. }
  650. sub {
  651.     bottom: -.25em
  652. }
  653. img {
  654.     border: 0
  655. }
  656. svg:not(:root) {
  657.     overflow: hidden
  658. }
  659. figure {
  660.     margin: 0
  661. }
  662. fieldset {
  663.     border: 1px solid silver;
  664.     margin: 0 2px;
  665.     padding: .35em .625em .75em
  666. }
  667. legend {
  668.     border: 0;
  669.     padding: 0
  670. }
  671. button,
  672. input,
  673. select,
  674. textarea {
  675.     font-family: inherit;
  676.     font-size: 100%;
  677.     margin: 0
  678. }
  679. button,
  680. input {
  681.     line-height: normal
  682. }
  683. button,
  684. html input[type=button],
  685. input[type=reset],
  686. input[type=submit] {
  687.     -webkit-appearance: button;
  688.     cursor: pointer
  689. }
  690. button[disabled],
  691. input[disabled] {
  692.     cursor: default
  693. }
  694. input[type=checkbox],
  695. input[type=radio] {
  696.     box-sizing: border-box;
  697.     padding: 0
  698. }
  699. input[type=search] {
  700.     -webkit-appearance: textfield;
  701.     -moz-box-sizing: content-box;
  702.     -webkit-box-sizing: content-box;
  703.     box-sizing: content-box
  704. }
  705. input[type=search]::-webkit-search-cancel-button,
  706. input[type=search]::-webkit-search-decoration {
  707.     -webkit-appearance: none
  708. }
  709. button::-moz-focus-inner,
  710. input::-moz-focus-inner {
  711.     border: 0;
  712.     padding: 0
  713. }
  714. textarea {
  715.     overflow: auto;
  716.     vertical-align: top
  717. }
  718. table {
  719.     border-collapse: collapse;
  720.     border-spacing: 0
  721. }
  722. body {
  723.     font-family: Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  724.     background: #000000;
  725.     color: #666;
  726.     font-size: 16px;
  727.     line-height: 1.5em
  728. }
  729. h1 {
  730.     color: #111;
  731.     margin: 0 0 12px;
  732.     font-size: 24px;
  733.     line-height: 1.5em
  734. }
  735. p {
  736.     margin: 0 0 10x
  737. }
  738. a {
  739.     color: #888;
  740.     text-decoration: none;
  741.     border-bottom: 1px solid #ccc
  742. }
  743. a:hover {
  744.     border-bottom-color: #888
  745. }
  746. body,
  747. .overlay {
  748.     -webkit-perspective: 1000;
  749.     -webkit-perspective-origin-y: 25%
  750. }
  751. .body--ready {
  752.     background: -webkit-linear-gradient(top, #000000 0, #000000 120%);
  753.     background: -moz-linear-gradient(top, #000000 0, #000000 120%);
  754.     background: -o-linear-gradient(top, #000000 0, #000000 120%);
  755.     background: -ms-linear-gradient(top, #000000 0, #000000 120%);
  756.     background: linear-gradient(top, #000000 0, #000000 120%)
  757. }
  758. .body--ready .overlay {
  759.     -webkit-transition: -webkit-transform .7s cubic-bezier(0.694, .0482, .335, 1), opacity .7s cubic-bezier(0.694, .0482, .335, 1);
  760.     -moz-transition: -moz-transform .7s cubic-bezier(0.694, .0482, .335, 1), opacity .7s cubic-bezier(0.694, .0482, .335, 1);
  761.     -ms-transition: -ms-transform .7s cubic-bezier(0.694, .0482, .335, 1), opacity .7s cubic-bezier(0.694, .0482, .335, 1);
  762.     -o-transition: -o-transform .7s cubic-bezier(0.694, .0482, .335, 1), opacity .7s cubic-bezier(0.694, .0482, .335, 1);
  763.     transition: transform .7s cubic-bezier(0.694, .0482, .335, 1), opacity .7s cubic-bezier(0.694, .0482, .335, 1)
  764. }
  765. .body--ready .ui,
  766. .body--ready .help {
  767.     display: block
  768. }
  769. .ui {
  770.     display: none;
  771.     position: absolute;
  772.     left: 50%;
  773.     bottom: 5%;
  774.     width: 300px;
  775.     margin-left: -150px
  776. }
  777. .ui-input {
  778.     width: 100%;
  779.     height: 50px;
  780.     background: 0;
  781.     font-size: 24px;
  782.     font-weight: 700;
  783.     color: #fff;
  784.     text-align: center;
  785.     border: 0;
  786.     border-bottom: 2px solid #fff
  787. }
  788. .ui-input:focus {
  789.     outline: 0;
  790.     border: 0;
  791.     border-bottom: 2px solid #fff
  792. }
  793. .ui-return {
  794.     display: none;
  795.     position: absolute;
  796.     top: 20px;
  797.     right: 0;
  798.     padding: 3px 2px 0;
  799.     font-size: 10px;
  800.     line-height: 10px;
  801.     color: #fff;
  802.     border: 1px solid #fff
  803. }
  804. .ui--enter .ui-return {
  805.     display: block
  806. }
  807. .ui--wide {
  808.     width: 76%;
  809.     margin-left: 12%;
  810.     left: 0
  811. }
  812. .ui--wide .ui-return {
  813.     right: -20px
  814. }
  815. .help {
  816.     display: none;
  817.     position: absolute;
  818.     top: 40px;
  819.     right: 40px;
  820.     width: 25px;
  821.     height: 25px;
  822.     text-align: center;
  823.     font-size: 13px;
  824.     line-height: 27px;
  825.     font-weight: 700;
  826.     cursor: pointer;
  827.     background: #fff;
  828.     color: #79a8ae;
  829.     opacity: .9;
  830.     -webkit-transition: opacity .1s cubic-bezier(0.694, .0482, .335, 1);
  831.     -moz-transition: opacity .1s cubic-bezier(0.694, .0482, .335, 1);
  832.     -ms-transition: opacity .1s cubic-bezier(0.694, .0482, .335, 1);
  833.     -o-transition: opacity .1s cubic-bezier(0.694, .0482, .335, 1);
  834.     transition: opacity .1s cubic-bezier(0.694, .0482, .335, 1)
  835. }
  836. .help:hover {
  837.     opacity: 1
  838. }
  839. .overlay {
  840.     position: absolute;
  841.     top: 50%;
  842.     left: 50%;
  843.     width: 550px;
  844.     height: 490px;
  845.     margin: -260px 0 0 -275px;
  846.     opacity: 0;
  847.     -webkit-transform: rotateY(90deg);
  848.     -moz-transform: rotateY(90deg);
  849.     -ms-transform: rotateY(90deg);
  850.     -o-transform: rotateY(90deg);
  851.     transform: rotateY(90deg)
  852. }
  853. .overlay--visible {
  854.     opacity: 1;
  855.     -webkit-transform: rotateY(0);
  856.     -moz-transform: rotateY(0);
  857.     -ms-transform: rotateY(0);
  858.     -o-transform: rotateY(0);
  859.     transform: rotateY(0)
  860. }
  861. .ui-share,
  862. .ui-details {
  863.     opacity: .9;
  864.     background: #fff;
  865.     z-index: 2
  866. }
  867. .ui-details-content,
  868. .ui-share-content {
  869.     padding: 100px 50px
  870. }
  871. .commands {
  872.     margin: 0;
  873.     padding: 0;
  874.     list-style: none;
  875.     cursor: pointer
  876. }
  877. .commands-item {
  878.     font-size: 12px;
  879.     line-height: 22px;
  880.     font-weight: 700;
  881.     text-transform: uppercase;
  882.     letter-spacing: 1px;
  883.     padding: 20px;
  884.     background: #fff;
  885.     margin-top: 1px;
  886.     color: #333;
  887.     opacity: .9;
  888.     -webkit-transition: -webkit-transform .7s cubic-bezier(0.694, .0482, .335, 1), opacity .1s cubic-bezier(0.694, .0482, .335, 1);
  889.     -moz-transition: -moz-transform .1s cubic-bezier(0.694, .0482, .335, 1), opacity .1s cubic-bezier(0.694, .0482, .335, 1);
  890.     -ms-transition: -ms-transform .1s cubic-bezier(0.694, .0482, .335, 1), opacity .1s cubic-bezier(0.694, .0482, .335, 1);
  891.     -o-transition: -o-transform .1s cubic-bezier(0.694, .0482, .335, 1), opacity .1s cubic-bezier(0.694, .0482, .335, 1);
  892.     transition: transform .1s cubic-bezier(0.694, .0482, .335, 1), opacity .1s cubic-bezier(0.694, .0482, .335, 1)
  893. }
  894. .commands-item--gap {
  895.     margin-top: 9px
  896. }
  897. .commands-item:hover {
  898.     opacity: 1
  899. }
  900. .commands-item:hover .commands-item-action {
  901.     background: #333
  902. }
  903. .commands-item a {
  904.     display: inline-block
  905. }
  906. .commands-item-mode {
  907.     display: inline-block;
  908.     margin-left: 3px;
  909.     font-style: italic;
  910.     color: #ccc
  911. }
  912. .commands-item-title {
  913.     display: inline-block;
  914.     width: 150px
  915. }
  916. .commands-item-info {
  917.     display: inline-block;
  918.     width: 300px;
  919.     font-size: 14px;
  920.     text-transform: none;
  921.     letter-spacing: 0;
  922.     font-weight: 400;
  923.     color: #aaa
  924. }
  925. .commands-item-action {
  926.     display: inline-block;
  927.     float: right;
  928.     margin-top: 3px;
  929.     text-transform: uppercase;
  930.     font-size: 10px;
  931.     line-height: 10px;
  932.     color: #fff;
  933.     background: #90c9d1;
  934.     padding: 5px 10px 4px;
  935.     border-radius: 3px
  936. }
  937. .commands-item:first-child {
  938.     margin-top: 0
  939. }
  940. .twitter-share {
  941.     position: absolute;
  942.     top: 4px;
  943.     right: 20px
  944. }
  945. .tabs-labels {
  946.     margin-bottom: 9px
  947. }
  948. .tabs-label {
  949.     display: inline-block;
  950.     background: #fff;
  951.     padding: 10px 20px;
  952.     font-size: 12px;
  953.     line-height: 22px;
  954.     font-weight: 700;
  955.     text-transform: uppercase;
  956.     letter-spacing: 1px;
  957.     color: #333;
  958.     opacity: .5;
  959.     cursor: pointer;
  960.     margin-right: 2px;
  961.     -webkit-transition: opacity .1s cubic-bezier(0.694, .0482, .335, 1);
  962.     -moz-transition: opacity .1s cubic-bezier(0.694, .0482, .335, 1);
  963.     -ms-transition: opacity .1s cubic-bezier(0.694, .0482, .335, 1);
  964.     -o-transition: opacity .1s cubic-bezier(0.694, .0482, .335, 1);
  965.     transition: opacity .1s cubic-bezier(0.694, .0482, .335, 1)
  966. }
  967. .tabs-label:hover {
  968.     opacity: .9
  969. }
  970. .tabs-label--active {
  971.     opacity: .9
  972. }
  973. .tabs-panel {
  974.     display: none
  975. }
  976. .tabs-panel--active {
  977.     display: block
  978. }
  979. .tab-panel {
  980.     position: absolute;
  981.     top: 0;
  982.     left: 0;
  983.     width: 100%
  984. }
  985. .touch .ui-input {
  986.     display: none
  987. }
  988. @media screen and (max-height:600px) {
  989.     .ui-input {
  990.         color: #111;
  991.         border-color: #111
  992.     }
  993.     .ui-input:focus {
  994.         border-color: #111
  995.     }
  996. }
  997.   </style>
  998. </html>
复制代码


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

立山

论坛元老
这个人很懒什么都没写!
快速回复 返回顶部 返回列表