简体   繁体   English

如何在不切断CSS单词的情况下打断单词

[英]How to break a word without cut the word on css

I want to a title like this 我想要这样的标题

Lorem ipsum dolor amet cray thunder cats ramps Lorem ipsum dolor amet克雷雷猫坡道

chicharrones yuccie prism anim next level chicharrones yuccie棱镜动画下一级

pork belly banh mi incididunt 猪肚banh mi incididunt

But this is what i got 但这就是我得到的

Lorem ipsum dolor amet cray thundercats ram Lorem ipsum dolor amet克雷雷公羊

ps chicharrones yuccie prism anim next leve ps chicharrones yuccie棱镜动漫下一个

l pork belly banh mi incididunt l猪肚banh mi incididunt

I tried word-break: break-all; 我尝试word-break: break-all;

What should i put to make it happen ? 我应该采取什么措施使其实现?

Thank you 谢谢

Your screenshots imply that either CSS, HTML Tags or HTML Entities force hyphenation. 屏幕快照暗示CSS,HTML标记或HTML实体强制使用连字符。

Check if your text contains <br> , <wbr> or &shy; 检查您的文字是否包含<br><wbr>&shy; and remove them. 并删除它们。

Declare hyphens: normal; 声明hyphens: normal; to stop breaking words in generally and word-wrap: break-word; 停止一般情况下的断行和word-wrap: break-word; to break words which are wider than the containing box. 打破比包含框宽的单词。

text-align: justify; should be working 应该工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM