覆盖element
.el-table >>> th {
background-color: #eee;
}
https://www.jianshu.com/p/9caf9e7aaca4javascript
bg图片遮罩,用before记得用position:relative;
用overflow时zoom:1 会挡住,这时候能够不用float:left 能够选择display:inline-block 或者用flex布局
作pc端通常经常使用margin:0 auto; max-width:1920px;min-width:1200px
Math.random用setInter改变元素,不要写在括号里,页面或重渲染,这时候会一直随机
css3动画能够在调试最后的css查看。css
jq实现异步操做方式,// async: false,页面会堵塞。使用同步等待请求回来再进行其余操做,卡死,不过能够防止浏览器拦截,解决办法,不一样步,继续异步打开一个窗口,再操做窗口java
function name() {
let defer = $.Deferred();
$.ajax({
url: `${$this.$HOST_NAME}/games/login`,
timeout:2000,
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Authorization: `${localStorage.token}`
},
// async: false,
type: "post",
data: {
gameName: datas.gameName,
userType: "0",
platform: datas.platform
},
success: res => {
if (res && res.code == 200) {
defer.resolve(res.data)
} else {
alert(res.message);
}
}
});
return defer.promise();
}
$.when(name()).done(function(res){
console.log(res)
window.open(
res.url,
"newwindow",
"height=750,width=1285, top=0, left=" +
(window.screen.availWidth - 1295) / 2 +
""
);
});