记录一次面试题

126 阅读1分钟

div垂直居中

方法有很多......

 div {
        width: 100px;
        height: 100px;
        position: absolute;
        background: grey;
        left: 50%;
        top: 50%;
        margin-left: -50px;
        margin-top: -50px;
    }

字符串翻转

let str = "abcde";
let after = [...str].reverse().join("");
console.log(after);

flex模型定宽

ajax跨域解决,前端解决方法

原型

promise

async/await

基本都是基础问题,时间长了,忘了好多,,,,有错误请务必指正