【发布时间】:2021-04-28 03:27:42
【问题描述】:
当使用 Blazor InputRadioGroup 组件时,选择后,在所有选项中都会绘制一个方形边框 - 是否可以禁用此功能,示例:
@page "/RatioButtons"
<h3>Ratio Buttons</h3>
<div>
<EditForm Model="person">
<InputRadioGroup Name="age" @bind-Value="person.Age">
Set Age:<br />
@for (int i = 18; i < 36; i++) {
<InputRadio Value="@i" />
@($" Age {i}")<br />
}
</InputRadioGroup>
</EditForm>
</div>
<br />
<div class="card p-3" >
<h5>@person.FirstName @person.LastName : @person.Age</h5>
</div>
@code {
class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
public int Age { get; set; }
}
Person person = new Person {
FirstName = "Alexa",
LastName = "Ansley",
Age = 24
};
}
我尝试了全局 CSS,重新启动应用程序,但什么也没有。
input[type="radio"]:focus {
outline: none !important;
}
【问题讨论】:
-
试试这个链接会有帮助 > stackoverflow.com/questions/23025695/…
-
大纲:无; ...没有工作。