1 input 高度和line-height設(shè)置為一致時(shí)鸡岗,光標(biāo)不垂直居中,居上沼死。
解決辦法: 根據(jù)字體大小和高度锡移,設(shè)置行高line-height.比如呕童,高度0.8rem,字體大小0.3rem,那么我們就可以設(shè)置line-height:0.4rem;將line-height調(diào)低,然后調(diào)試即可
2 ios打開新地址 window.open失效淆珊,
// 安卓可以這么用
let a = document.createElement("a");
a.setAttribute("href", url);
// a.setAttribute("target", "_blank");
document.getElementsByTagName('body')[0].appendChild(a);
a.click();
// ios必須加上setTimeout
let a = document.createElement("a");
a.setAttribute("href", url);
// a.setAttribute("target", "_blank");
document.getElementsByTagName('body')[0].appendChild(a);
setTimeout(()=>{
a.click();
}, 100)
3 fixed 在ios上可能被ios自帶背景覆蓋
將fixed的元素和主要視圖main同級(jí),并設(shè)置根元素height:100%;overflow:hidden