主頁
CSS
CSS 偽元素
嘗試一下:使用 ::after 偽元素
執行 ❯
建立您
自己的
網站
×
改變方向
儲存程式碼
改變主題,深色/淺色
前往 Spaces
<!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 the content of an element.</p> <h1>This is a heading</h1> </body> </html>