Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 长字符串和保留完整单词CSS问题_Html_Css_Twitter Bootstrap - Fatal编程技术网

Html 长字符串和保留完整单词CSS问题

Html 长字符串和保留完整单词CSS问题,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我使用的是引导典型的div容器。我有两个问题要解决: 不允许长字符串溢出div container 为了保持单词不被刹车,比如若单词达到极限,完整的单词会在下面 这就是我得到的: word-wrap: break-word; -ms-word-break: break-all; word-break: break-all; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; 它基本上不让长字符串溢出div,而是在和平中剪切单词,如

我使用的是引导典型的div容器。我有两个问题要解决:

  • 不允许长字符串溢出div container
  • 为了保持单词不被刹车,比如若单词达到极限,完整的单词会在下面
  • 这就是我得到的:

    word-wrap: break-word;
    -ms-word-break: break-all;
    word-break: break-all;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
    
    它基本上不让长字符串溢出div,而是在和平中剪切单词,如:

    something, somethi
    ng, something, som
    ething, etc.
    

    有什么想法吗?

    而不是
    断字:全部断字
    
    使用
    断字:正常。它会起作用的。

    嘿,维克斯,谢谢。不幸的是,它不起作用:/td被扩展(溢出)到最长字符串的同一端,与正常情况相同。您可以为它添加一个提琴吗?所以看看你的html也会有帮助。嗯,看起来它在小提琴上很有效,所以你的评论很好,谢谢!我会弄明白为什么它对我不起作用,但至少我知道它应该:)