For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/css/properties/border-style.md.
Lynx
  • 简体中文
  • border-style

    介绍

    用于设置四个边框的样式,该属性可按顺序设置上边框样式、右边框样式、下边框样式、左边框样式。

    使用示例

    语法

    border-style: double solid dotted dashed;

    取值

    • none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset
    • 支持 1 - 4 值语法(上 → 右 → 下 → 左)

    形式定义

    初始值solid
    适用元素所有元件
    是否支持继承no
    是否支持动画no

    形式语法

    
    border-style = [ <line-style> ]{1,4}
    <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset
    

    与 Web 的区别

    • MDN 参考
    • 默认值不同(Web 为 none
    • 值为 none/hidden 时边框宽度保持原值(Web 会置为 0
    • 不支持 inherit/initial/revert/unset 全局值

    兼容性

    LCD tables only load in the browser

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。