我以前从未见过这种情况,也不知道从哪里开始寻找问题。我首先要说的是,我是这个网站的狂热用户,以及其他喜欢它的人,我很清楚可能还有其他人遇到了这个确切的问题,但我一定没有找到正确的措辞,因为我搜索了所有的资源,找不到任何关于这个问题的信息,哪怕只是一点点。
我想在页面顶部制作两个单选按钮,在博客和简历之间切换。我已经非常接近我想要的了,我唯一的问题是,除非我的浏览器是全屏的,否则单选按钮完全没有反应。没有悬停样式更改,无法单击它们,什么都没有。它们也可以是带背景色的纯文本。
<!-- Main Navigation -->
<nav class="site-nav">
<?php if(is_home() ) {
echo '<a class="white-link" href="#"><button type="button" class="btn btn-primary" >Blog</button></a>';
} else if(is_page( 'Work History' )) {
echo '<div class="btn-group">
<button class="btn btn-primary">
<input type="radio" onclick="window.location='#';">Blog
</button>
<button class="btn btn-primary active">
<input type="radio">Resume
</button>
</div>';
} else {
echo '<div class="btn-group">
<button class="btn btn-primary">
<input type="radio" onclick="window.location='http://theme-rusers.io';">Blog
</button>
<button class="btn btn-primary">
<input type="radio" onclick="window.location='',
esc_url(get_permalink( get_page_by_title('Work History'))),
'';">Resume
</button>
</div>';
} ?>
这是一个WordPress主题,我是新的代码(在过去的一年内),如果我未能提供正确或足够的信息,请问我,我将编辑这篇文章,我正在使用引导程序。
我试着切换到使用按钮而不是无线电选择器,但仍然出现了同样的问题。
我真的很感谢在这方面的任何帮助,如果这个话题以一个简单的链接结束,我提前道歉,我已经几个月没有在任何论坛上提问了,因为我通常可以自己研究,有很多信息。
但显然还不够
完整的Header.php代码:http://www.pastebucket.com/551354
如果我将一些z-index
添加到它们的顶级父容器中,这些按钮就可以单击。
/* Target the first div which has a sibling from the first row within .container-fluid */
.container-fluid > .row:first-of-type > div:not(:only-child) {
z-index: 1;
}