Skip to content

[css] 第407天 不用换行的标签,怎么伪元素实现换行的效果? #2431

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

第407天 不用换行的标签,怎么伪元素实现换行的效果?

3+1官网

我也要出题

Activity

wheatup

wheatup commented on May 27, 2020

@wheatup

使用\A 换行,并且指定white-space: pre保留换行效果

.foo::after {
  content: '123\A 456';
  white-space: pre;
}
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

        @haizhilin2013@wheatup

        Issue actions

          [css] 第407天 不用换行的标签,怎么伪元素实现换行的效果? · Issue #2431 · haizlin/fe-interview