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

  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

fareast_mzh

打赏个金币

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值