📜  来自数据属性的 CSS 内容 - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:26.358000             🧑  作者: Mango

代码示例1
div { 
    content: attr(id); /* Get content from the ID */
    content: attr(class); /* Get content from the class attribute */
      content: attr(data-custom); /* Get content from a custom attribute, e.g. 
*/ }