http://healthunit.com从手机设备查看后,屏幕顶部会出现一个干净的水平滚动菜单。我试图模仿相同的确切功能,这要归功于我正在重新设计具有巨大导航元素级别的网站。响应式水平滚动菜单
要求:
- 左,右滚动单击选项 在空间中心
- 只有一个列表项可见在同一时间
- 中心列表项选项
- 水平滚动&响应
- 点击列表中的最后一个或第一个选项将带您到列表中的第一个选项或最后一个选项
我给这部分当前的HTML是:
<nav id="sub" class="clearfix">
<ul class="wrapper">
<a href="#"><li>Estimate</li></a>
<a href="#"><li>About</li></a>
<a href="#"><li>Customer Information</li></a>
<a href="#"><li>Financing</li></a>
<a href="#"><li>Careers</li></a>
<a href="#"><li>Locate Us</li></a>
<a href="#"><li>Inspiration</li></a>
</ul>
</nav>
当前连接到它的CSS是:
nav#sub {
background: #004173;
background: linear-gradient(to bottom, #004173 0%,#014f8d 100%);
background: -moz-linear-gradient(top, #004173 0%, #014f8d 100%);
background: -ms-linear-gradient(top, #004173 0%,#014f8d 100%);
background: -o-linear-gradient(top, #004173 0%,#014f8d 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#004173), color-stop(100%,#014f8d));
background: -webkit-linear-gradient(top, #004173 0%,#014f8d 100%);
border-bottom: #00325a solid 3px;
box-shadow: 0 4px 6px 0 #BFBFBF;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#004173', endColorstr='#014f8d',GradientType=0);
webkit-box-shadow: 0 4px 6px 0 #BFBFBF;
}
#sub ul {
text-align: center;
}
#sub ul li {
padding: 10px 3.3%;
}
#sub a {
color: #fff;
font-size: 10pt;
font-weight: 400;
text-decoration: none;
}
#sub ul a:hover li {
background: #007FEB;
}
你想让它通过左右滚动或2个按钮来控制吗(“<" and ">”)? (...或者两者兼而有之?) –
嗨Stefan,我的目标是用左右两个按钮(< and >)控制它。 – Cutter
你可能想添加一些你想要帮助的具体细节:)。 – Blunderfest