主頁
CSS
CSS 顏色關鍵字
試一試:使用 currentcolor 關鍵字
執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> body { color: green; } div { box-shadow: 0px 0px 15px currentcolor; border: 5px solid currentcolor; padding: 15px; } </style> </head> <body> <h2>The currentcolor Keyword</h2> <p>This is some text in the body part...</p> <div> <p>This div's border color and shadow color is set to the current color value of the body element.</p> </div> </body> </html>