css如何实现底部tapbar栏效果


本文摘自PHP中文网,作者V,侵删。

首先我们来看一下实现效果:

367b8d7d622beaa058494d4af66d640.png

css代码:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

*{

           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;

       }

html代码:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

<%--底部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">首页推荐</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 ">我的推荐</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 ">我的福利</p>

           </a>

       </li>

   </ul>

推荐教程:CSS入门基础教程

以上就是css如何实现底部tapbar栏效果的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

css position 属性值有哪些?

浅谈css实现毛玻璃效果的方法

用记事本怎么写css

css如何从png里截取小图标

css如何实现元素不随滚动条滚动

css实现元素隐藏和显示的属性有哪些

如何定义项目列表css

css怎么实现六边形

css图片怎么溢出隐藏

手把手教你css如何实现毛玻璃效果

更多相关阅读请进入《css》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...