
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>










