转载地址:/kerryqpw/article/details/70174702
css
html内容超出了div或p的宽度 让内容自动换行
html
adfasfeBNFGHFJFasddddddddddddfJKUIszffdaddffsdgsdffgdgfsWEadfasfeBNFGHFJFasddddddddddddfJKUIszffdaddffsdgsdffgdgfsWEadfasfeBNFGHFJFasddddddddddddfJKUIszffdaddffsdgsdffgdgfsWEadfasfeBNFGHFJFasddddddddddddfJKUIszffdaddffsdgsdffgdgfsWEadfasfeBNFGHFJFasddddddddddddfJKUIszffdaddffsdgsdffgdgfsWEadfasfeBNFGHFJFasddddddddddddfJKUIszffdaddffsdgsdffgdgfsWE
adfasfeBNFGHFJFasddddddddddddfJKUIszffdaddffsdgsdffgdgfsWEadfasfeBNFGHFJFasddddddddddddfJKUIszffdaddffsdgsdffgdgfsWEadfasfeBNFGHFJFasddddddddddddfJKUIszffdaddffsdgsdffgdgfsWEadfasfeBNFGHFJFasddddddddddddfJKUIszffdaddffsdgsdffgdgfsWEadfasfeBNFGHFJFasddddddddddddfJKUIszffdaddffsdgsdffgdgfsWEadfasfeBNFGHFJFasddddddddddddfJKUIszffdaddffsdgsdffgdgfsWE
css样式
#testDiv{ width: 100%;
height: auto;
word-wrap:break-word;
word-break:break-all;
overflow: hidden; }
css详解浏览器
word-wrap: normal|break-word;
normal
只在容许的断字点换行(浏览器保持默认处理,默认值)。
break-word
在长单词或 URL 地址内部进行换行。
word-break: normal|break-all|keep-all;
normal
使用浏览器默认的换行规则。(默认值)
break-all
容许在单词内换行。
keep-all
只能在半角空格或连字符处换行。