3 回答
TA贡献1829条经验 获得超13个赞
我会考虑使用font-size的CSS hack:
.entry {
font-size:0;
}
.entry * {
font-size:initial;
}
<div class="entry">
<p class="page-header" style="text-align: center;"><strong>Enter</strong></p>
<p> somethin here</p>
Enter (this will be hidden !!)
<div class="subhead">another text here</div>
</div>
另一个想法是visibility:
.entry {
visibility:hidden;
}
.entry * {
visibility:visible;
}
<div class="entry">
<p class="page-header" style="text-align: center;"><strong>Enter</strong></p>
<p> somethin here</p>
Enter (this will be hidden !!)
<div class="subhead">another text here</div>
</div>
TA贡献1848条经验 获得超10个赞
你认为这行得通吗
var ele =document.getElementsByClassName('entry')[0]
ele.removeChild(ele.lastChild)
添加回答
举报