我在我的网站中使用 Twitter 引导程序,并且我的跨度可能包含长词,我需要打破它。我使用这个 Css 但不工作?什么问题?
.fidDivComment {
white-space: pre-wrap;
display: inline-block;
}
我在我的网站中使用 Twitter 引导程序,并且我的跨度可能包含长词,我需要打破它。我使用这个 Css 但不工作?什么问题?
.fidDivComment {
white-space: pre-wrap;
display: inline-block;
}
您需要将其添加到该跨度的 CSS
span {
-ms-word-break: break-all;
word-break: break-all;
/* Non standard for webkit */
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
请参阅这篇文章以获得解释。
这些问题说明了这一点:
(使用推特引导)
所以引导修复是这样的:@include hyphens;
这个开箱即用的引导混合将添加 word-wrap: break-word;
这个混合存在于这个路径下:
/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss