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

Created on 26 May 2020  ·  1Comment  ·  Source: haizlin/fe-interview

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

3+1官网

我也要出题

css

Most helpful comment

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

.foo::after {
  content: '123\A 456';
  white-space: pre;
}

>All comments

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

.foo::after {
  content: '123\A 456';
  white-space: pre;
}
Was this page helpful?
0 / 5 - 0 ratings