Put title/alt attributes into CSS :after { content: image }?
问题 I’ve got the following CSS to add a PDF icon to any link that links to a PDF: a.pdf-link:after { padding-left: 2px; content: url(../images/icon-pdf-link.gif);} Is it possible to put some title and alt attributes on this image? I would like it so that the user is able to hover over the icon and get some text like “This links to a .pdf file.” Which I’ve typically done just by putting title attributes to it, but can’t figure out if I can do that through this method. 回答1: No, content only accepts