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

      

  • 相关阅读:
    Spring事务管理
    Spring Bean装配(下)——注解
    Spring Bean装配(上)
    Spring入门篇
    Spring入门篇——AOP基本概念
    计算机组成原理(1)——系统概述
    浏览器缓存 总结
    React-router 4 总结
    Redux 总结
    操作系统位数 的 概念(转)
  • 原文地址:https://www.cnblogs.com/mingzhanghui/p/9418471.html
Copyright © 2020-2023  润新知