7B2主题美化之移动端底部菜单栏

给大家分享一下WordPress网站7B2主题移动端底部菜单栏的美化教程,其他WordPress主题可能不适用!美化的内容主要是修改了移动端菜单栏的位置,不涉及图标的修改!

效果图

7B2主题美化之移动端底部菜单栏

教程

修改文件:b2/Assets/fontend/mobile.css (有些可能不止一个,但是看对应代码就能辨别,差不多的就是)

查找:.mobile-footer-menu.footer-fixed{,将该处替换为

/*修改-www.xingkongweb.com/59748.html*/
.mobile-footer-menu.footer-fixed{
position: fixed;
padding-bottom: calc(env(safe-area-inset-bottom) + 6px);
}
/*修改*/

查找:.mobile-footer-menu{,将该处替换为

/*修改-www.xingkongweb.com/59748.html*/ 
.mobile-footer-menu{
box-shadow: 0 -1px 3px 0 rgba(26,26,26,.1);
padding: 5px;
z-index: 5;
flex-flow: nowrap;
display: flex;
justify-content: space-between;
}
/*修改-www.xingkongweb.com/59748.html*/

查找:.mobile-footer-menu {,将该处替换为

 /*修改-www.xingkongweb.com/59748.html*/ 
.mobile-footer-menu {
transform: translate(0);
transition: transform .5s,background-color .5s ease-out;
box-sizing: border-box;
left: 0;
right: 0;
background: rgba(255, 255, 255, 0.9);
border-radius: 12px;
margin: 0 auto;
width: 90%;
bottom: 10px;
}
/*修改-www.xingkongweb.com/59748.html*/

查找:.mobile-footer-menu .mobile-footer-center button i {,将该处替换为

/*修改-www.xingkongweb.com*/ 
.mobile-footer-menu .mobile-footer-center button i {
font-size: 22px;
color: #fff;
display: block;
text-align: center;
width: 40px;
height: 40px;
line-height: 40px;
border-radius: 50%;
margin-top: -40px;
}
/*修改结束*/

部分手机显示异常问题

在mobile.css 文件中最底部添加新的CSS样式可解决苹果显示问题

 @media screen and (max-width: 768px){
.mobile-footer-menu .mobile-footer-center button i {
right: -30%;
position: absolute;
top: 50%;
}
.mobile-footer-center {
padding: 10px;
}
}

移动端底部菜单栏常驻

目前7B2主题移动端菜单栏往下滑动时会自动隐藏,将以mobile.css中下代码删除,或者注释掉即可常驻,不会自动隐藏了

/*固定菜单栏---https://www.xingkongweb.com/59748.html 
.mobile-footer-menu.footer-down{
transform: translate(0,100%);
transition: transform .5s,background-color .5s ease-out;
}
固定菜单栏https://www.xingkongweb.com/59748.html ---*/

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA打赏
共{{data.count}}人
人已打赏
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索