如何将元素显示为包含文本的块?

时间:2014-06-09 10:23:42

标签: html css

的style.css:

.bar75 { display:block; text-indent:-9999px; width:75px; background-color: rgba(184,201,204,1.00);}

.bar100 { display:block; text-indent:-9999px; width:375px; background-color: rgba(184,201,204,1.00);}

的index.html:

 <td width="100%"><span class="bar100">.</span></td>

外观如何

enter image description here

我想让它与里面的文字一起显示。就像写在其中的“高级”一样。我试过了

<td width="100%"><span class="bar100">Advanced</span></td>

它不显示文字。我应该在哪里放置文字?

1 个答案:

答案 0 :(得分:1)

快速回答 - 删除text-indent:-9999px;。这是删除文本:)