Maison  >  Article  >  interface Web  >  Comment obtenir l'effet de la barre de frappe inférieure avec CSS

Comment obtenir l'effet de la barre de frappe inférieure avec CSS

王林
王林avant
2020-05-16 08:57:152458parcourir

Comment obtenir l'effet de la barre de frappe inférieure avec CSS

Jetons d'abord un coup d'œil à l'implémentation :

Comment obtenir leffet de la barre de frappe inférieure avec CSS

code css :

*{
           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 a p {
           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;
       }

code html :

<%--底部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" / alt="Comment obtenir l'effet de la barre de frappe inférieure avec CSS" >
               </div>

               <p class="botm-title">首页推荐</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" / alt="Comment obtenir l'effet de la barre de frappe inférieure avec CSS" >
               </div>

               <p class="botm-title actives ">我的推荐</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" / alt="Comment obtenir l'effet de la barre de frappe inférieure avec CSS" >
               </div>

               <p class="botm-title ">我的福利</p>
           </a>
       </li>
   </ul>

Tutoriel recommandé : Tutoriel de base pour démarrer avec CSS

Ce qui précède est le contenu détaillé de. pour plus d'informations, suivez d'autres articles connexes sur le site Web de PHP en chinois!

Déclaration:
Cet article est reproduit dans:. en cas de violation, veuillez contacter admin@php.cn Supprimer