var divDom = document.querySelector('div');
if (getComputedStyle(divDom).position === 'static') {
if (divDom.style.position === '' || divDom.style.position === 'static') {
divDom.style.position = 'relative';
}
}
var divDom = document.querySelector('div');
if (getComputedStyle(divDom).position === 'static') {
if (divDom.style.position === '' || divDom.style.position === 'static') {
divDom.style.position = 'relative';
}
}
本文标题:标签没有定位的时候给他加relative
本文链接:https://www.haomeiwen.com/subject/nynxzxtx.html
网友评论