zoukankan      html  css  js  c++  java
  • css 参考手册 部署到本地

    * 到css参考手册网站

    http://css.doyoe.com/

    下载chm手册

    * 到github下载对应的html页面

    cd /Applications/XAMPP/htdocs
    git clone https://github.com/doyoe/css-handbook
    

     或者从百度云盘 密码: sgvk

    * 启动xampp

    * 浏览器访问 本地css手册

    http://localhost/css-handbook/index.htm

    port 8000

    function copyToClipboard(text) {
        if (text.indexOf('-') !== -1) {
            let arr = text.split('-');
            text = arr[0] + arr[1];
        }
        var textArea = document.createElement("textarea");
        textArea.style.position = 'fixed';
        textArea.style.top = '0';
        textArea.style.left = '0';
        textArea.style.width = '2em';
        textArea.style.height = '2em';
        textArea.style.padding = '0';
        textArea.style.border = 'none';
        textArea.style.outline = 'none';
        textArea.style.boxShadow = 'none';
        textArea.style.background = 'transparent';
        textArea.value = text;
        document.body.appendChild(textArea);
        textArea.select();
    
        try {
            var successful = document.execCommand('copy');
            var msg = successful ? '成功复制到剪贴板' : '该浏览器不支持点击复制到剪贴板';
            alert(msg);
        } catch (err) {
            alert('该浏览器不支持点击复制到剪贴板');
        }
    
        document.body.removeChild(textArea);
    }
    
    var a = document.createElement("a");
    a.href = "javascript:;";
    a.innerHTML = "复制密码到剪贴板";
    a.setAttribute("data-text", "sgvk");
    document.body.appendChild(a);
    
    a.style.backgroundColor = "#214fa0";
    a.style.color = "#fff"
    a.style.right = 0;
    a.style.top = 0;
    a.style.display = "block";
    a.style.position = "fixed";
    a.style.zIndex = 3;
    a.style.borderRadius = "4px";
    a.style.padding = "2px 4px";
    a.style.cursor = "pointer";
    
    a.onclick = function() {
        var text = this.getAttribute("data-text");
        copyToClipboard(text);
        var that = this;
        setTimeout(function() {
          that.style.display = "none";
        }, 100);
    };
    

      

  • 相关阅读:
    BZOJ 3157 &数学乱搞...
    BZOJ 2654 & 玄学二分+MST
    概率与期望的一些问题整理
    BZOJ1024&丝帛搜索
    BZOJ 1260&UVa 4394 区间DP
    hdu Atlantis(线段树的面积并)
    hdu Stars in Your Window(线段树,涉及扫描线建立)
    hdu Potted Flower(线段树,求区间的最值)
    hdu Frequent values (线段树 求最值)
    hdu Stars(树状数组)
  • 原文地址:https://www.cnblogs.com/mingzhanghui/p/9418471.html
Copyright © 2011-2022 走看看