• word-break


    1.html

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="Overflowing_content.css">
    <title>Title</title>
    </head>
    <body>


    <p>1. <code>word-break: normal</code></p>
    <p class="normal narrow">This is a long and
    Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu
    グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p>

    <p>2. <code>word-break: break-all</code></p>
    <p class="breakAll narrow">This is a long and
    Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu
    グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p>

    <p>4. <code>word-break: break-word</code></p>
    <p class="breakWord narrow">This is a long and
    Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu
    グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p>

    </body>
    </html>


    2.css

    .narrow {
    padding: 10px;
    border: 1px solid;
    500px;
    margin: 0 auto;
    font-size: 20px;
    line-height: 1.5;
    letter-spacing: 1px;
    }

    .normal {
    word-break: normal;
    }

    .breakAll {
    word-break: break-all;
    }

    .breakWord {
    word-break: break-word;
    }


  • 相关阅读:
    java生成验证码
    springmvc笔记(来自慕课网)
    angularJs编写多指令的情况
    四年前端开发的迷茫.
    angularJs的ui-router总结
    grunt构建前端自动化的开发环境
    socket传送文件
    socket--粘包
    socket--接受大数据
    动态导入模块
  • 原文地址:https://www.cnblogs.com/pascal1000/p/12965242.html
Copyright © 2020-2023  润新知