break-all:允许在单词内换行
keep-all:只能在半角空格或连字符处换行
<!DOCTYPE html> <html> <head> <Meta charset="utf-8" /> <Meta name="viewport" content="width=device-width,initial-scale=1"> <title>我是中国人</title> <style> p { background-color: red; height: 200px; width: 200px; } .p1 { word-break: break-all; } .p2 { keep-all; } </style> </head> <body> <p class="p1"> Good morning,my name is xx,it is really a great honor to have this opportunity for an interview,and i hope i can make a good performance today </p> <p class="p2"> https://www.cnblogs.com/zhangxuechao/ </p> </body> </html>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。