代码之家  ›  专栏  ›  技术社区  ›  Lasse Espeholt

如果CSS或Asp.net中的文本太宽,则进行剪切

  •  0
  • Lasse Espeholt  · 技术社区  · 16 年前

    我在一个固定宽度的div中有这个文本:

    Some headline (2009-10-10 small)
    Some headline (2009-10-10 small)
    Some headline (2009-10-10 large)
    

    Some headline (2009-10-10 small)
    Some wide headline (2009-10-10
    large)
    Some headline (2009-10-10 large)
    

    Some headline (2009-10-10 small)
    Some wide... (2009-10-10 large)
    Some headline (2009-10-10 large)
    

    2 回复  |  直到 16 年前
        1
  •  0
  •   o.k.w    16 年前

    这是我使用mootools的方法:

    http://mooshell.net/34WbY/

    调整浏览器大小,看看神奇之处。

        2
  •  1
  •   Ryan Florence    16 年前

    如果你试图按字符数进行翻转,这可能会有点棘手,除非你使用的是固定宽度的字体。或者,您可以尝试更保守的最大字符数。

    我确信还有更具创造性的方法,我渴望从其他人那里“听到”。