海量收录 · 12,310+ 源码 / 模板 / 插件 / 教程,付款后立即下载 开通会员享折扣| 我的订单| 客服 QQ 923457156
前端开发教程

CSS 自动换行属性

2025-01-13 36 次浏览 免费资源

word-wrap属性用于在一行中断开并换行到下一行。

示例

以下显示了示例语法 −

实时演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            width: 200px;
            border: 2px solid #000000;
         }
         div.b {
            word-wrap: break-word;
         }
      </style>
   </head>
   <body>
      <h2>word-wrap: break-word property</h2>
      <div class = b> ThisisdemotextThisisdemotext:
      thisisaveryveryveryveryveryverylongword. The long word wraps to
      the next line.</div>
   </body>
</html>

输出

以上就是CSS 自动换行属性的详细内容,更多请关注双恒网络其它相关文章!

免费下载无需付费,点击即可获取
去下载