运行 ❯
获取您的
自己
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> h1 { border-top-style: solid; border-top-color: hsla(89, 43%, 51%, 0.3); } div { border-style: solid; border-top-color: hsla(89, 43%, 51%, 0.3); } </style> </head> <body> <h1>A heading with a colored top border</h1> <div>The border-top-color can be specified with a HSLA value.</div> <p><strong>Note:</strong> Always declare the border-top-style or the border-style property before the border-top-color property. An element must have a border before you can change the color.</p> </body> </html>