请告诉我,当一个节点内的节点被替换时,它是隐藏的,是否由回流或重绘引起?
.div1{
display: none;
}
.div2{
width: 100px;
}
<div class="div1">
<div class="div2"></div>
</div>
var div2Rework = $('.div2').clone();
div2Rework.css('width', '150px');
$('.div2').replaceWith(div2Rework);