attr() = attr(attr-name)
示例代码:
a:after {
content: "("attr(href)")";
font-size: 12px;
}
CSS参考手册
IE | Firefox | Chrome | Safari | Opera | iOS Safari | Android Browser | Android Chrome |
---|---|---|---|---|---|---|---|
6.0-7.0 | 2.0+ | 4.0+ | 3.1+ | 15.0+ | 3.2+ | 2.1+ | 18.0+ |
8.0+ |