如何在 Semantic-ui 中将顶部导航栏上的下拉按钮设置为活动状态?
How can I set a dropdown button on a top navbar as active in Semantic-ui?
我查看了 Semantic-ui 文档,但找不到如何继续在我的顶部导航栏菜单中将下拉项设置为 active
(未打开),与常规项目。
active
class 用于打开它们,而用于突出显示常规菜单 links.
换句话说,当我在该菜单下拉项的其中一条路线中时,我想突出显示它,与 link 相同,但我不知道 [=26] 是什么=] 我应该使用。
我开始为此制作自己的 css class,但我很确定他们有一个关键字,我想检查一下。
编辑:我做了一些 quickly,测试了倒置菜单,无论是否是次要的。然而,这个问题仍然成立。
.menu:not(.secondary) .dropdown.item.current{
background: rgba(255,255,255,.15);
color: #fff !important;
}
.menu:not(.secondary) .dropdown.item.current:after{
visibility: visible!important;
z-index: 100!important;
background: #3d3e3f !important;
margin: 0 !important;
box-shadow: none !important;
border: none !important;
}
.menu.inverted .dropdown.item.current{
border-color: #fff;
}
对于只突出显示而不打开的下拉项,在元素中包含 'selected' class 而不是 'active' class
我查看了 Semantic-ui 文档,但找不到如何继续在我的顶部导航栏菜单中将下拉项设置为 active
(未打开),与常规项目。
active
class 用于打开它们,而用于突出显示常规菜单 links.
换句话说,当我在该菜单下拉项的其中一条路线中时,我想突出显示它,与 link 相同,但我不知道 [=26] 是什么=] 我应该使用。
我开始为此制作自己的 css class,但我很确定他们有一个关键字,我想检查一下。
编辑:我做了一些 quickly,测试了倒置菜单,无论是否是次要的。然而,这个问题仍然成立。
.menu:not(.secondary) .dropdown.item.current{
background: rgba(255,255,255,.15);
color: #fff !important;
}
.menu:not(.secondary) .dropdown.item.current:after{
visibility: visible!important;
z-index: 100!important;
background: #3d3e3f !important;
margin: 0 !important;
box-shadow: none !important;
border: none !important;
}
.menu.inverted .dropdown.item.current{
border-color: #fff;
}
对于只突出显示而不打开的下拉项,在元素中包含 'selected' class 而不是 'active' class