Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 主菜单在我的笔记本电脑上很好用,但在手机上不行_Css_Wordpress_Responsive_Nav - Fatal编程技术网

Css 主菜单在我的笔记本电脑上很好用,但在手机上不行

Css 主菜单在我的笔记本电脑上很好用,但在手机上不行,css,wordpress,responsive,nav,Css,Wordpress,Responsive,Nav,我正在用WordPress建立一个网站。昨天下午一切都很好,然后头部导航系统突然失灵。它首先从显示未分配的焦点属性开始,但用:focus修复了这个问题。它可以在笔记本电脑上正常工作,但不能在移动设备上正常工作。它在小屏幕上没有活动颜色,但我希望它有。谢谢你的帮助 .site-header .tab a:focus{ color: #FF6508 !important; outline:none !important; } .site-header .tab a:active{

我正在用WordPress建立一个网站。昨天下午一切都很好,然后头部导航系统突然失灵。它首先从显示未分配的焦点属性开始,但用:focus修复了这个问题。它可以在笔记本电脑上正常工作,但不能在移动设备上正常工作。它在小屏幕上没有活动颜色,但我希望它有。谢谢你的帮助

.site-header .tab a:focus{ 
    color: #FF6508 !important;
    outline:none !important;
}

.site-header .tab a:active{ 
    color: #FF6508 !important;
}

.site-header .tab a:hover{ 
    color: #FF6508 !important;
}

.site-header .tab a:visited{ 
    color: #fff !important;
}

.site-header .tab a:after{ 
    color: #FF6508 !important;
}

@media screen and (max-width: 800px){
.site-header .tab a:link{ 
    color: #fff !important;
}

.site-header .tab a:active{ 
    color: #FF6508 !important;
}
}

您想要的:active伪类的颜色正在被重写

@media screen and (max-width: 800px)
.site-header .tab a:link {
    color: #fff;
}
.site-header .tab a:link {
    color: #fff!important;
}
似乎您正在使用JS向每个元素添加一个焦点类。您可以使用相同的JS将样式css添加到元素中。这将覆盖其他地方写的任何内容。您似乎还需要在单击最新的导航李a时,从所有其他导航李a中删除.focus

如果你不喜欢JS,那么为了避免重写CSS,可以考虑代码的层次和特殊性。我希望下面的代码在您的自定义CSS文件中以更具体的方式显示出来。也许是这样:

.site-header .primary-menu .tab a:active{ 
    color: #FF6508 !important;
}

ccartstudio.co.nz。干杯主菜单在这里似乎不起作用,尽管它应该是正常的。也许关键是找到合适的班级。请问在哪里可以找到菜单上的课程。干杯