分类 代码 下的文章

CSS - 一个div设置多个背景图

.index-product-main {
    box-shadow: #abc6fb 0 0 18px inset;/*内部阴影*/
    padding: 20px;
    border: 1px solid #abc6fb;
    border-radius: 3px;
    background-image:url("../img/index/product/left-top.png"),url("../img/index/product/right-top.png"),url("../img/index/product/left-bottom.png"),url("../img/index/product/right-bottom.png");
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
    background-position: left top, right top, left bottom, right bottom;
}

拓展

搭建 gogs

https://www.miroc.net/67.html
https://www.jianshu.com/p/f7a7a6c6027d

webpack - source-map

config
      // https://webpack.js.org/configuration/devtool/#development
      .when(process.env.NODE_ENV === 'development',
        config => config.devtool('source-map')
      )

深拷贝

var test = {
    a:"ss",
    b:"dd",
    c:[
        {dd:"css",ee:"cdd"},
        {mm:"ff",nn:"ee"}
    ]
};
var test1 = JSON.parse(JSON.stringify(test));//拷贝数组
//
test1.c[0].dd="change"; //改变test1的c属性对象的d属性
console.log(test);  //不影响test
console.log(test1);//test1改变

JS - 微信移动端自带返回 - 判断

$(function () {
    function pushHistory(){
        var state = {
            title: "title",
            url: "#"
        };
        window.history.pushState(state, "title", "#");
    }
    pushHistory();
    window.addEventListener("popstate", function (e) {
        //TODO
    }, false);
});

JS - 判断微信相关

function isWeiXin() {
    var ua = navigator.userAgent.toLowerCase();
    if (ua.match(/MicroMessenger/i) == 'micromessenger' && ua.match(/WindowsWechat/i) != 'windowswechat' && ua.match(/WechatDevTools/i) !='wechatdevtools') {
        return true;
    } else {
        return false;
    }
}