【发布时间】:2021-11-25 15:27:42
【问题描述】:
我想知道是否有办法将链接添加到伪元素。我认为它适用于内容:url(),但它不是
content: url('https://google.com');
width: 100px;
height: 100px;
}
【问题讨论】:
-
您不能使用 CSS3 ::after 或 ::before 选择器添加 html 元素。 content:"" 属性只接受纯文本。您最好的选择是使用 JavaScript 替代方案。
标签: css