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);
    };
    

      

  • 相关阅读:
    lambda表达式
    netstat
    【makfile | 资源】网址链接
    【makefile】 $@ $^ %< 的使用

    【顺序容器 || 09】
    标准IO库
    我使出这“三板斧”(分段锁、哈希锁、弱引用锁)灭霸跑了......
    JAVA 线上故障排查完整套路,从 CPU、磁盘、内存、网络、GC 一条龙!
    一条 SQL 引发的事故,同事直接被开除!
  • 原文地址:https://www.cnblogs.com/mingzhanghui/p/9418471.html
Copyright © 2011-2022 走看看