源代码:
<!DOCTYPE html> <html> <head> <style> h1:after {content:url(smiley.gif);} </style> </head> <body> <h1>This is a heading</h1> <p>The :after pseudo-element inserts content after an element.</p> <h1>This is a heading</h1> <p><b>Note:</b> IE8 supports the content property only if a !DOCTYPE is specified.</p> </body> </html>
运行结果:
IT自学教程工具