选择器:
radiobutton· 设计器组件: 单选框 · 按名称:radiobutton#名称或#名称
伪状态: :checked :hover · 子控件: radiobutton:indicator
可用属性
| 属性 | 说明 |
|---|---|
color |
文字颜色 |
font-size / font-family / font-bold / font-italic |
字体 |
background-color |
控件背景(胶囊样式选中时作为填充色) |
border-color / border-width / border-radius / show-border |
外框 |
transparent-background |
真=不绘制默认底板 |
indicator-style |
default 圆点(默认) / pill 胶囊选中 / none 隐藏圆点 |
indicator-size / indicator-spacing |
圆点大小、与文字间距(pill 时忽略圆点) |
mark-color |
选中圆点颜色(:checked 块,默认样式) |
indicator-checked-image |
选中态替换图片 |
hover-text-color |
悬停文字色 |
示例
胶囊选中(图1 风格)
radiobutton#单选框1 {
indicator-style: pill;
border-radius: 18;
color: #B0B0B0;
transparent-background: true;
}
radiobutton#单选框1:checked {
background-color: #9B6FD0;
color: #FFFFFF;
}
经典圆点
radiobutton {
indicator-size: 16;
mark-color: #9B6FD0;
}