我想在 href 链接上使用数据描述,但没有显示描述。有人知道如何使用它,请告诉我。这是演示链接 http://jsfiddle.net/KNa3A/
最佳答案
您可以为此使用 :after 伪元素 - http://jsfiddle.net/spacebeers/KNa3A/4/
.your_class:after {
content: attr(data-description);
display: block;
padding: 0 0 0 10px;
color: red;
}
将 :after 元素的内容设置为 attr(data-description) 就可以了。
关于jquery - href 链接上的数据描述使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11686555/