如果您缩小浏览器,您将看到一个.header-mobile
元素。它是固定位置的。它在桌面上仍然存在,但在移动设备上它只是留在顶部。
这是移动 CSS:
@media handheld, only screen and (max-width: 767px) {
#header,
#header-fixed {
display: none;
}
#header-mobile {
background: url(images/header-fixed-bg.png) repeat-x 0 0;
border-bottom: 1px solid #111;
display: block;
position: fixed;
top: 0;
width: 100%;
-webkit-box-shadow: rgba(0,0,0,0.3) 0 0 4px;
-moz-box-shadow: rgba(0,0,0,0.3) 0 0 4px;
box-shadow: rgba(0,0,0,0.3) 0 0 4px;
}
的HTML:
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</header>
<div id="header-mobile">
<div id="header-mobile-content">
<h1 class="logo"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">test</a></h1>
<a class="button button-small" href="">
<img src="<?php bloginfo( 'template_url' ); ?>/images/icon-button.png" alt="" />
<span>Request a quote</span>
</a>
<ul class="navigation-mobile">
<li>
<a class="responsive" href="#responsive">
<span>Responsive Design</span>
</a>
</li>
<li>
<a class="touch" href="#touch">
<span>Touch Friendly</span>
</a>
</li>
<li>
<a class="programming" href="#programming">
<span>Custom Programming</span>
</a>
</li>
<li>
<a class="mobile" href="#mobile">
<span>Mobile/Site Apps</span>
</a>
</li>
</ul>
</div>
</div>
现场直播:http ://www.hfwebdesign.com/?ModPagespeed=off
可能是什么原因?