【问题标题】:Is it possible to use a pseudo-element (eg. ":before") in an inline style attribute? [duplicate]是否可以在内联样式属性中使用伪元素(例如“:before”)? [复制]
【发布时间】:2015-10-08 23:19:35
【问题描述】:
<div style="What I need to put inside this tag?"></div>

是否可以在 html 的 style 标记中执行此操作?

div::before { 
    content: "Read this: ";
}

怎么做?

谢谢!

【问题讨论】:

    标签: html css


    【解决方案1】:

    简短回答:你不能

    在这里提问和回答:Using CSS :before and :after pseudo-elements with inline CSS?

    【讨论】:

      猜你喜欢
      • 2010-11-02
      • 2013-12-06
      • 1970-01-01
      • 2021-12-30
      • 2020-03-25
      • 2021-10-13
      • 2013-11-04
      相关资源
      最近更新 更多