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

Docker builds jenkins+maven code building and deployment platform

Table of contents Docker Basic Concepts Docker in...

Introduction to 10 online development tools for web design

1. Online Text Generator BlindTextGenerator: For ...

jQuery plugin to achieve seamless carousel

Seamless carousel is a very common effect, and it...

Media query combined with rem layout in CSS3 to adapt to mobile screens

CSS3 syntax: (1rem = 100px for a 750px design) @m...

How to create a responsive column chart using CSS Grid layout

I have been playing around with charts for a whil...

HTML displays ellipsis beyond the text... implemented through text-overflow

You need to apply CSS to div or span at the same t...

SQL ROW_NUMBER() and OVER() method case study

Syntax format: row_number() over(partition by gro...

A brief discussion on the issue of element dragging and sorting in table

Recently, when using element table, I often encou...

js to achieve the effect of light switch

This article example shares the specific code of ...

Element Table table component multi-field (multi-column) sorting method

Table of contents need: Problems encountered: sol...

Detailed explanation of views in MySQL

view: Views in MySQL have many similarities with ...

Common functions of MySQL basics

Table of contents 1. Common function classificati...

HTML reuse techniques

HTML reuse is a term that is rarely mentioned. Tod...