给移动端网站添加底部导航按钮demo
html标签
其中 nav
请根据你的主题改写,并修改php中的 nav
,否则设置无效,又或者因为冲突而发生排版错误。
<div class="nav">
<ul>
<li><a href="链接"><img src="图标链接"></a>主页</li>
<li><a href="链接"><img src="图标链接"></a>分类</li>
<li><a href="链接"><img src="图标链接"></a>留言</li>
<li><a href="链接"><img src="图标链接"></a>说说</li>
<li><a href="链接"><img src="图标链接"></a>关于</li>
</ul>
</div>
css
.nav {
display: none;
}
@media only screen and (max-width:450px) {
.site-info {
padding: 15px 0 52px 0;
}
#advert_widget,.php_text .widget-text,.widget .textwidget {
padding: 0;
}
.nav {
position: fixed;
z-index: 999;
bottom: 0;
width: 100%;
height: 52px;
display: block;
right: 0;
box-shadow: 0px 0px 10px 3px rgba(223,233,247,1.0);
-webkit-box-shadow: 0px 0px 10px 3px rgba(223,233,247,1.0);
-moz-box-shadow: 0px 0px 10px 3px rgba(223,233,247,1.0);
-o-box-shadow: 0px 0px 10px 3px rgba(223,233,247,1.0);
-ms-box-shadow: 0px 0px 10px 3px rgba(223,233,247,1.0);
}
.nav {
padding-left: 0;
margin-bottom: 0;
list-style: none;
}
.nav img {
width: 25px !important;
height: 25px !important;
}
.nav > ul {
position: relative;
z-index: 1;
height: 52px;
background: rgba(255,255,255,.85);
list-style-image: none;
list-style-type: none;
margin: 0px;
padding: 0px !important;
}
.nav ul li {
position: relative;
float: left;
width: 20%;
margin: 0px;
padding: 0px;
list-style-image: none;
list-style-type: none;
top: 7px;
left: 6%;
}
.nav ul li a {
display: block;
margin-right: auto;
margin-left: auto;
}
}