运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,暗/亮
前往 Spaces
<!DOCTYPE html> <html> <head> <style> h1 { border-top-style: solid; border-top-width: 1px; } div { border-style: solid; border-top-width: 1px; } </style> </head> <body> <h1>A heading with a 1px thick top border</h1> <div>A div element with a 1px thick top border.</div> <p><strong>Note:</strong> Always declare the border-top-style or the border-style property before the border-top-width property. An element must have a border before you can change the color.</p> </body> </html>