我接手了一个网站,我正在做出回应。这对我来说是一个“学习php / css”项目,因为我不是编码器(除了基本的html / css)
我正在努力让菜单响应,并且它以某种方式工作。但是,调整窗口大小时,菜单图标不会显示。任何有用的提示?
下面是PHP resp CSS
<div id="navigation">
<ul class="tabbed">
<li<?php if ( is_home() ) : ?> class="current_page_item"<?php endif; ?>><a href="<?php echo get_option('home'); ?>">Hem</a></li>
<?php wp_list_pages('title_li=&depth=1'); ?>
<li class="navigation"></li>
<li class="menuicon"><a href="javascript:void(0);" onclick="myFunction">☰</a></li>
</ul>
<div class="clearer"> </div>
</div>
CSS文件
ul.tabbed {
display: inline;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
ul.tabbed li {
float: left;
list-style: none;
}
ul.tabbed a {
text-decoration: none;
}
ul.tabbed li.menuicon {
display: none;
}
#navigation-wrapper {}
#navigation-wrapper-2 {
background: url('img/wrapper-2.png') repeat-y center top;
}
#navigation {
background: url('img/navigation.png') repeat-x left top;
min-height: 46px;
padding: 0 10px;
}
#navigation a {
color: #000;
display: inline-block;
font-weight: bold;
transition: 0.3s;
font-size: 1.3em;
padding: 7px 12px 8px;
margin: 8px 0px 0px 0px;
}
#navigation a:hover {
color: #FFF;
}
#navigation li.current_page_item a, #navigation li.current_page_parent a {
color: #000;
}
#navigation li.current_page_item a {
background: #fdf9f0;
}
#navigation li.current_page_parent a {
background: #fdf9f0;
}