您好,欢迎访问一九零五行业门户网

使用 CSS 返回所选元素的属性值

attr() css函数使用css返回所选元素的属性值
示例您可以尝试运行以下代码来实现css 中的 attr() 函数
实时演示
<!doctype html><html> <head> <style> a:before {content: " (" attr(href) ")";} </style> </head> <body> <h2>information resource</h2> <p> resource:<a href="https://www.qries.com">welcome to qries </a> </p> </body></html>
以上就是使用 css 返回所选元素的属性值的详细内容。
其它类似信息

推荐信息