JSFiddle

  • Arrow upwards

    单元素实现 上升箭头

    <i></i>
    
  • Canvas #1 is the latest revision

    canvas 动画

    let canvas = document.getElementById('canvas');
    let ctx = canvas.getContext('2d');
    
    ctx.fillStyle = 'green';
    ctx.fillRect(10, 10, 100, 100);
    
    ctx ...
  • Pure css 秒表计时器

    http://thecodeplayer.com/walkthrough/make-a-stopwatch-using-css3-without-images-or-javascript?s=rl

    <!-- Lets make a simple stopwatch using CSS3 -->
    <!-- Time for the markup -->
    <!-- The core logic is a simple div containing numbers being moved
    using keyframe animations. The numbers have space between them so that they
    can be aligned vertically easily by reducing the container width. Lets
    wrap up the 'numbers' in a cell to display only 1 digit-->
    
    <!-- We will replicate the digits now -->
    <div class="container">
    	<!-- time to add the controls -->
    	<input id="start" name="controls" type="radio" />
    	<input id="stop" name="controls" type="radio" />
    	<input id="reset" name="controls" type="radio" />
    	<div class="timer">
    		<div class="cell">
    			<div class="numbers tenhour moveten">0 1 2 3 4 5 6 7 8 9</div>
    		</div>
    		<div class="cell">
    			<div class="numbers hour moveten">0 1 2 3 4 5 6 7 8 9 ...</div></div></div></!--></div></!--></!--></!--></!-->
  • IE arrow

    线条箭头

    <ul>
        <li class="active">
        11111
            <span class="arrow"></span>
        </li>
        <li>
        2222
            <span class="arrow"></span>
        </li>
        <li>
        3333
            <span class="arrow"></span>
        </li>
    </ul>
  • promise xhr

    aliyun

    var xhrFunc = function(options) {
            var options = options || {};
            var method = options.method || 'get';
            var url = options.url || '';
            return new Promise(function ...
  • 去重排序家千分号

    aliyun

    var arr = [2,5,6,8,5,4,2,3,1]; 
    var newarr = [...new Set(arr)].sort(function(a,b ...
  • Copy

    ie9+ 复制效果

    var btn = document.getElementById('btn');
    btn.addEventListener('click', function(){
      var inputText = document.getElementById('inputText');
      var currentFocus = document.activeElement;
      inputText.focus ...
  • ng service reference #5 is the latest revision

    ng service reference

    var app = angular.module('app', []);
    
    app.controller('ACtrl', function($scope) {
    $scope.a = {b:{c:1}}}
    console.log(1)
    })
  • object.defineProperty

    od

    let obj =  {}
    let a
    Object.defineProperty(obj, 'a', {
    get: function() {
     return a;
    },
    set: function(val) {
    a = val
    }
    })
    obj.a =1 ...
  • Grid

    https://developer.mozilla.org/zh-CN/docs/Web/CSS/grid

    <!-- Learn about this code on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/grid -->
    
    <div id="container">
      <div></div>
      <div></div>
      <div></div>
      <div></div>
      <div></div>
      <div></div>
      <div></div>
      <div></div>
    </div>