首页 > 解决方案 > 悬停时星云单选按钮光标更改

问题描述

在 Nebular 中,默认情况下,指针在悬停在 上方时不会改变nb-radio。我需要实现它,我通过在标签中包含span标签并将其设置pointer-events为 auto 进行了尝试,但它似乎不起作用。有解决方法吗?

app.component.html

<nb-radio-group [(ngModel)]="selectedOption">
    <nb-radio *ngFor="let option of options" [value]="option.value">
        <span style="pointer-events: auto;">{{option.label}}</span>
    </nb-radio>
</nb-radio-group>

标签: htmlangularradio-buttonhovernebular

解决方案


我相信你可以使用 CSScursor属性。

例子:

nb-radio {
    pointer-events: none;
}

推荐阅读