使用“文本缩进”隐藏文本 [英] hiding text using "text-indent"
本文介绍了使用“文本缩进”隐藏文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图使用CSS通过设置 text-indent:-999px; 隐藏一些
< li& code>。
由于某种原因,当我将文档的方向设置为rtl
(从右到左 - 我的网站是在希伯来语。)。
当方向是rtl时,文本仍然显示...
任何人都知道为什么,并绕过这个?
I'm trying to hide some text inside an <li>
element using CSS by setting text-indent: -999px;
.
For some reason this doesn't work when I set the direction of the document to "rtl"
(right to left - my site is in Hebrew).
When direction is "rtl" the text still shows...
Anyone knows why, and a way around this?
推荐答案
与文本缩进:-9999px
一起尝试使用 :block;
。
此外,如果你需要li元素水平浮动(例如水平菜单),使用 float:left; / code>。
Additionally, if you need the li elements to float horizontally (e.g. a horizontal menu), use float: left;
.
这篇关于使用“文本缩进”隐藏文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文