超过固定宽度用...表示

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            border:1px solid red;
            300px;
            /* text-align 文本水平对齐
                    可选值:
                          left 左侧对齐
                          right 右对齐
                          center 居中对齐
                          justify 两端对齐 */
            /* text-align: justify; */
            font-size: 50px;
            /* text-decoration 文本样式修饰
                    可选值:
                            none 什么都没有
                            underline 下划线
                            line-through 删除线
                            overline 上划线 */
            
            text-decoration: line-through red;
            /* white-space: nowrap 不换行
                            normal 正常
                            pre 保留空白 */
            white-space: nowrap;
            overflow: hidden;
            /* 
             ellipsis 省略 */
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
    <div>今天天气真晴朗</div>
</body>
</html>
原文地址:https://www.cnblogs.com/kukai/p/12296536.html