💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
**border-top** * 描述:复合属性。设置对象上边框属性。 * 版本:CSS1 * 继承性:无 **语法** ``` border-top: border-top-width | border-top-style | border-top-color; ``` 颜色种类 * border-top-width:设置边框的宽度。 * border-top-style:设置边框的样式。 * border-top-color:设置边框的颜色。 * inherit:设置从父元素继承 border 的属性。 **使用说明** 虽然有三个参数可以设置,并不强制全部设置。如:border-top:solid #ff0000; 若使用该复合属性定义其单个参数,则其他参数的默认值将无条件覆盖各自对应的单个属性设置。 **代码示例** ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>border-top</title> <style> #container{ width: 50px; height: 50px; border-style:solid; border-top:thick double #ff0000; } </style> </head> <body> <div id="container"> </div> </body> </html> ``` ![border-top](https://box.kancloud.cn/f1167fc1e223577f24f2bcc7ca6cc0bf_72x72.png)