Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
87 views
in Technique[技术] by (71.8m points)

javascript - Hide text in html which does not have any html tags


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I would consider a CSS hack with font-size:

.entry {
  font-size:0;
}
.entry * {
  font-size:initial;
}
<div class="entry">
<p class="page-header" style="text-align: center;"><strong>Enter</strong></p>
<p>&nbsp; somethin here</p>
Enter (this will be hidden !!)
<div class="subhead">another text here</div>
</div>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...