CSS implements the bottom tapbar function

CSS implements the bottom tapbar function

Now many mobile phones have the function of switching the tab bar at the bottom. I happened to have a similar function recently. Without further ado, let's go straight to the code.

First look at the effect picture

Tab bar switching

CSS Styles

*{
           margin: 0;
           padding: 0;
           text-decoration: none;
           list-style: none;

       }
       .foot {
           width: 100%;
           height: 68px;
           background: #FFFFFF;
           position: fixed;
           bottom: 0;
           display: flex;
           justify-content: space-around;
           z-index: 999;
           /*line-height: 20px;*/
       }

       .foot li {
           height: 100%;
       }

       .foot li a {
           display: block;
           width: 100%;
           height: 100%;
           /* color: #979797;*/
       }

       .foot li a img {
           /*display: block;*/
           width: 26px;
           height: 26px;
           margin-top: 10px;
       }

       .foot li ap {
           font-size: 12px;
           width: 100%;
           text-align: center;
           /* color: #979797;*/
           margin-top: 7px;
       }
       .botm-title{
           color: #979797;
       }

       .actives {
           color: #5C91FA;
       }
       .xz-img{
           text-align: center;
       }

Page Code

<%--Bottom tapbar--%>
   <ul class="foot">
       <li class="Imgbox" img="/images/tuiJianCus/index-wxz-icon.png" data-img="/images/tuiJianCus/index-xz-icon.png">
           <a href="/views/tuiJianCus/index.jsp">
               <div class="xz-img">
                   <img src="/images/tuiJianCus/index-wxz-icon.png" />
               </div>

               <p class="botm-title">Home page recommendation</p>
           </a>
       </li>
       <li class="Imgbox" img="/images/tuiJianCus/tuijiang-wxz-icon.png" data-img="/images/tuiJianCus/tuijiang-xz-icon.png">
           <a href="/views/tuiJianCus/tuijian_speed.jsp">
               <div class="xz-img">
                   <img src="/images/tuiJianCus/tuijiang-xz-icon.png" />
               </div>

               <p class="botm-title actives ">My recommendations</p>
           </a>
       </li>
       <li class="Imgbox" img="/images/tuiJianCus/my-wxz-icon.png" data-img="/images/tuiJianCus/my-xz-icon.png">
           <a href="/views/tuiJianCus/usercenter.jsp">
               <div class="xz-img">
                   <img src="/images/tuiJianCus/my-wxz-icon.png" />
               </div>

               <p class="botm-title ">My benefits</p>
           </a>
       </li>
   </ul>

This is the end of this article about how to implement the bottom tapbar with CSS. For more relevant CSS bottom tapbar content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

<<:  Getting Started Tutorial for Newbies ⑤: Website Registration is Very Easy, Quick Registration Tips

>>:  MySQL extracts Json internal fields and dumps them as numbers

Recommend

How to use CSS to center a box horizontally and vertically (8 methods)

Original code: center.html : <!DOCTYPE html>...

How to implement page jump in Vue project

Table of contents 1. Create a vue-cli default pro...

Example of Vue implementing fixed bottom component

Table of contents 【Effect】 【Implementation method...

Introduction to the process of building your own FTP and SFTP servers

FTP and SFTP are widely used as file transfer pro...

Example of converting JS one-dimensional array into three-dimensional array

Today I saw a friend asking a question in the Q&a...

Web Design Tutorial (2): On Imitation and Plagiarism

<br />In the previous article, I introduced ...

CSS3 uses the transition property to achieve transition effects

Detailed description of properties The purpose of...

VM VirtualBox virtual machine mount shared folder

One environment Install VMware Tools on CentOS 7 ...

Vue implements internationalization of web page language switching

1. Basic steps 1: Install yarn add vue-i18n Creat...

Design and implementation of Vue cascading drop-down box

Table of contents 1. Database design 2. Front-end...

Chrome plugin (extension) development guide (complete demo)

Table of contents Written in front Preface What i...

Vue implements a simple timer component

When doing a project, it is inevitable to encount...