Skip to content

[css] 第80天 写例子说明如何强制(自动)中、英文换行与不换行 #573

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

第80天 写例子说明如何强制(自动)中、英文换行与不换行

Activity

dondonZh

dondonZh commented on Jul 5, 2019

@dondonZh

没记起来,看了网上的摘要:

  1. word-break:break-all;只对英文起作用,以字母作为换行依据
  2. word-wrap:break-word; 只对英文起作用,以单词作为换行依据
  3. white-space:pre-wrap; 只对中文起作用,强制换行
  4. white-space:nowrap; 强制不换行,都起作用
  5. white-space:nowrap; overflow:hidden; text-overflow:ellipsis;不换行,超出部分隐藏且以省略号形式出现(部分浏览器支持)
jiamianmao

jiamianmao commented on Aug 12, 2019

@jiamianmao

贤弟们,愚兄又要发文章了
CSS 单词换行 and 断词,你真的完全了解吗

smile-2008

smile-2008 commented on Feb 3, 2021

@smile-2008

没记起来,看了网上的摘要:

  1. word-break:break-all;只对英文起作用,以字母作为换行依据
  2. word-wrap:break-word; 只对英文起作用,以单词作为换行依据
  3. white-space:pre-wrap; 只对中文起作用,强制换行
  4. white-space:nowrap; 强制不换行,都起作用
  5. white-space:nowrap; overflow:hidden; text-overflow:ellipsis;不换行,超出部分隐藏且以省略号形式出现(部分浏览器支持)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @smile-2008@haizhilin2013@jiamianmao@dondonZh@chenshijin1

        Issue actions

          [css] 第80天 写例子说明如何强制(自动)中、英文换行与不换行 · Issue #573 · haizlin/fe-interview