因为我没有访问html / PHP的页面,只能通过CSS添加,
我一直在做一个网站上的修改,并添加文本通过:before /:after,并发现escape unicode应该用于诸如添加内容之前或之后的空间。
我该怎么做呢?
这是我想要实现的一个例子:
#headerAgentInfoDetailsPhone:after { content:"Office: XXXXX </br> Mobile: YYYYY "; }
(当然,换行符无效)
解决方法
content
房产状态:
Authors may include newlines in the generated content by writing the “\A” escape sequence in one of the strings after the ‘content’ property. This inserted line break is still subject to the ‘white-space’ property. See “Strings” and “Characters and case” for more information on the “\A” escape sequence.
所以你可以使用:
#headerAgentInfoDetailsPhone:after { content:"Office: XXXXX \A Mobile: YYYYY "; white-space: pre; /* or pre-wrap */ }