您可以将哪种内容传递给CSS的“内容”属性?

时间:2018-08-07 10:24:49

标签: css

我的意思是,除了最终仅使用简单的文字广告attr()功能之外,我们还可以合法地将哪些类型的内容传递给content css属性?例如,我可以传递html代码吗?

1 个答案:

答案 0 :(得分:1)

content属性与::before::after伪元素一起使用,以插入生成的内容。

CSS语法:

content: normal|none|counter|attr|string|open-quote|close-quote|no-open-quote|no-close-quote|url|initial|inherit;