2017-06-14 133 views
-1

这是我正在使用的网站http://www.jokerleb.com/,我正在使用此https://responsive.menu,免费版本。它会出现在400px或更小的设备上。使菜单打开时按钮消失

enter image description here

我想要的按钮,并在“类别”中消失时,菜单打开。我想把x放在右上角。

我试图

.responsive-menu-accessible is-active{ 
    background-color: transparent!important; 
} 

.responsive-menu-accessible is-active text{ 
    background-color:transparent!important; 
} 

它不工作,怎么办呢?我可以从检查元素中获得一些成功,但我认为我正在处理错误的类。

+0

如果使用.is-active .text,您的is-active和text也是一个类吗?使用display也更好:如果你想隐藏某些东西,则不显示。 – PenAndPapers

+0

我对所讨论的菜单并不熟悉,但它听起来像'is-active'实际上应该是'.is-active'。 'text'应该**可能**也是'.text',但我不确定这是引用一个类还是实际的文本字段。 –

+0

不要忘记在!结尾的分号重要 - 你省略了它,我只在整理代码时才注意到它。 –

回答

1
@media screen and (max-width: 400px) 
(index):172 
.responsive-menu-open button#responsive-menu-button .responsive-menu-box { 
    color: #fdc300; 
    float: right; 
} 

@media screen and (max-width: 400px) 
(index):172 
.responsive-menu-open button#responsive-menu-button:hover, .responsive-menu-open button#responsive-menu-button:focus, button#responsive-menu-button:hover, button#responsive-menu-button:focus { 
    background: transparent; 
    top: 0!important; 
} 

@media screen and (max-width: 400px) 
(index):172 
.responsive-menu-open #responsive-menu-container.push-top, .responsive-menu-open #responsive-menu-container.slide-top { 
    transform: translateY(0); 
    -ms-transform: translateY(0); 
    -webkit-transform: translateY(0); 
    -moz-transform: translateY(0); 
    padding-top: 30px; 
} 

将css更改为上面的代码,并从响应菜单标签类中删除文本。 Result