做一个底部导航栏的,主要有连接,关于我们,等等

前端我是用jsp写的,如果需要HTML,可以把开头的部分删除就行。

jsp:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>

    <head>
        <meta charset="UTF-8">
        <title></title>
        <link rel="stylesheet" type="text/css" href="../css/footer.css" />
    </head>

    <body>
        <!--底部_start-->
        <div class="site-footer">
            <div class="footer-related">
                <div class="footer-article w1100">
                    <dl class="contact clearfix">
                        <dt class="fl">
                            <i class="iconfont"></i>
                        </dt>
                        <dd class="fl">
                            <p class="text">售前咨询热线</p>
                            <p class="tel">400-11111-111</p>
                            <a href="#">在线咨询</a>
                        </dd>
                    </dl>
                    <dl class="col-article">
                        <dt>电商产品</dt>
                        <dd>
                            <a href="#">云小店</a>
                        </dd>
                        <dd>
                            <a href="#">品牌商城</a>
                        </dd>
                        <dd>
                            <a href="#">商户商城</a>
                        </dd>
                        <dd>
                            <a href="#">批发商城</a>
                        </dd>
                        <dd>
                            <a href="#">招商加盟商城</a>
                        </dd>
                        <dd>
                            <a href="#">同城电商平台</a>
                        </dd>
                    </dl>
                    <dl class="col-article">
                        <dt>行业方案</dt>
                        <dd>
                            <a href="#">新零售</a>
                        </dd>
                        <dd>
                            <a href="#">O2O</a>
                        </dd>
                        <dd>
                            <a href="#">实体商超</a>
                        </dd>
                        <dd>
                            <a href="#">多供应商</a>
                        </dd>
                        <dd>
                            <a href="#">百货商场</a>
                        </dd>
                        <dd>
                            <a href="#">农村电商</a>
                        </dd>
                    </dl>
                    <dl class="col-article">
                        <dt>帮助中心</dt>
                        <dd>
                            <a href="#">新手运营手册</a>
                        </dd>
                        <dd>
                            <a href="#">视频教程</a>
                        </dd>
                        <dd>
                            <a href="#">云商城</a>
                        </dd>
                        <dd>
                            <a href="#">云物流</a>
                        </dd>
                        <dd>
                            <a href="#">更新日志</a>
                        </dd>
                        <dd>
                            <a href="#">商学院</a>
                        </dd>
                    </dl>
                    <!--关于我们-->
                    <dl class="col-article">
                        <dt>关于我们</dt>
                        <dd>
                            <a href="#">公司简介</a>
                        </dd>
                        <dd>
                            <a href="#">服务市场</a>
                        </dd>
                        <dd>
                            <a href="#">客户案例</a>
                        </dd>
                        <dd>
                            <a href="#">代理合作</a>
                        </dd>
                        <dd>
                            <a href="#">投诉建议</a>
                        </dd>
                        <dd>
                            <a href="#">站点地图</a>
                        </dd>
                    </dl>
                    <dl class="wx">
                        <dt>关注商之云</dt>
                        <dd>
                            <img src="../images/erweima.png">
                        </dd>
                        <dd class="other">
                            <span>分公司:</span>
                            <a href="#">北京</a>
                            <a href="#">上海</a>
                            <a href="#">杭州</a>
                            <a href="#">深圳</a>
                        </dd>
                    </dl>
                </div>
                <div class="footer-links w1100">
                    <p>友情链接:</p>
                    <div class="clearfix">
                        <a href="#">站点列表</a>
                        <a href="#">云商城</a>
                        <a href="#">云产品库</a>
                        <a href="#">收银狗</a>
                        <a href="#">神码收银</a>
                        <a href="#">云物流</a>
                        <a href="#">云ERP</a>
                        <a href="#">生鲜电商</a>
                        <a href="#">农村电商</a>
                        <a href="#">母婴电商</a>
                        <a href="#">电商学员</a>
                    </div>
                </div>
                <!--友情链接结束-->
                <div class="footer-info w1100">
                    <div class="info-text w1100">
                        <p class="copyright">
                            版权所有<em></em>
                            <a href="#">备案号</a>
                        </p>
                        <p class="company-info">863科技园2号楼3层</p>
                        <p class="qualified"></p>
                    </div>

                </div>
            </div>
        </div>
    </body>

    </html>

css:

@charset "UTF-8";
* {
    margin: 0;
    padding: 0;
    font-family: "微软雅黑";
}

.clearfix:after {
    content: ".";
    display: block;
    height: 0;
    visibility: hidden;
    clear: both;
}

.w1100 {
    width: 1100px;
    margin: 0 auto;
}

.fl {
    float: left;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}


/*消息*/

.validInfo {
    background-color: rgba(0, 0, 0, .6);
    width: 190px;
    height: 48px;
    line-height: 48px;
    text-align: center;
    color: #fff;
    border-radius: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 110px;
    font-size: 14px;
    display: none;
}


/*底部*/

.site-footer {
    font-size: 14px;
    line-height: 1.8;
    color: #a8aaba;
    background: #32333b;
}

.site-footer a {
    color: #a8aaba;
}

.site-footer a:hover {
    color: #f44 !important;
}

.site-footer .footer-article {
    padding: 30px 0 20px;
    overflow: hidden;
}

.site-footer .contact {
    float: left;
    width: 280px;
}

.site-footer .contact dt {
    width: 90px;
}

.site-footer .contact .iconfont {
    width: 66px;
    height: 66px;
    display: block;
    float: left;
    background: url(../images/kefu.png) center center no-repeat;
    background-size: 55px;
}

.site-footer .contact .text {
    font-size: 14px;
    line-height: 30px;
    color: #fff;
}

.site-footer .contact .tel {
    padding: 3px 0 15px;
    font-size: 20px;
    color: #fff;
}

.site-footer .contact a {
    display: block;
    width: 90px;
    font-size: 14px;
    line-height: 30px;
    text-align: center;
    border: 0px solid #9b9ea0;
    border-radius: 4px;
    background: url(../images/qq1.gif);
    background-size: 100%;
}

.site-footer .contact a:hover {
    background: url(../images/qq.gif);
    background-size: 100%;
}

.site-footer .col-article {
    float: left;
    width: 171px;
}

.site-footer .col-article dt {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: normal;
    color: #d7d8d9;
}

.site-footer .col-article dd {
    margin-bottom: 8px;
    overflow: hidden;
}

.site-footer .col-article dd a {
    font-size: 12px;
    color: #9b9ea0;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.site-footer .wx {
    float: left;
    width: 135px;
    margin-right: 0;
}

.site-footer .wx dt {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: normal;
    color: #d7d8d9;
}

.site-footer .wx dd {
    margin-bottom: 15px;
}

.site-footer .wx dd img {
    display: block;
    width: 110px;
    height: 110px;
    margin: 5px 0;
    border-radius: 2px;
}

.site-footer .wx dd.other {
    margin-bottom: 0;
    line-height: 18px;
}

.site-footer .wx dd.other span {
    display: block;
    font-size: 12px;
}

.site-footer .wx dd.other a {
    display: inline-block;
    margin-right: 5px;
    font-size: 12px;
    line-height: 18px;
    vertical-align: top;
}

.footer-links {
    padding: 10px 0;
    border-top: 1px solid #41424c;
    border-bottom: 1px solid #41424c;
}

.footer-links p {
    font-size: 14px;
    color: #a8aaba;
}

.footer-links a {
    margin-right: 20px;
    font-size: 12px;
    color: #a8aaba;
}

.footer-info .info-text {
    padding: 20px 0;
    font-size: 12px;
    text-align: center;
}

.footer-info .info-text .nav-bottom {
    padding: 20px 0 5px;
    font-size: 14px;
    color: #ccc;
    text-align: center;
}

.footer-info .info-text .nav-bottom a {
    padding: 0 8px;
    color: #9b9ea0;
}

.footer-info .info-text .copyright {
    padding-top: 5px;
}

.footer-info .info-text em {
    padding: 0 8px;
}

展示:

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,下面是Android Studio中创建含有底部导航栏的页面的步骤: 1. 打开Android Studio并创建一个新项目。 2. 在项目中创建一个新的Activity。 3. 打开xml布局文件,添加一个底部导航栏。可以使用Google提供的Material Design组件库中的BottomNavigationView。 4. 在Activity中,使用findViewByID方法找到布局文件中的BottomNavigationView对象。 5. 使用BottomNavigationView的setOnNavigationItemSelectedListener方法设置导航栏的选项被选中时的监听器。 6. 在监听器中,根据选中的选项,使用Intent启动对应的Activity。 以下是一个简单的示例代码: 布局文件 `activity_main.xml`: ```xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/frameLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/bottom_navigation" /> <com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/bottom_navigation" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" app:menu="@menu/bottom_navigation_menu" /> </RelativeLayout> ``` `MainActivity.java` 文件: ```java public class MainActivity extends AppCompatActivity { private BottomNavigationView bottomNavigationView; private FrameLayout frameLayout; private HomeFragment homeFragment; private DashboardFragment dashboardFragment; private NotificationsFragment notificationsFragment; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); bottomNavigationView = findViewById(R.id.bottom_navigation); frameLayout = findViewById(R.id.frameLayout); // 初始化Fragment homeFragment = new HomeFragment(); dashboardFragment = new DashboardFragment(); notificationsFragment = new NotificationsFragment(); // 默认显示HomeFragment setFragment(homeFragment); // 设置底部导航栏的监听器 bottomNavigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { switch (item.getItemId()) { case R.id.nav_home: setFragment(homeFragment); return true; case R.id.nav_dashboard: setFragment(dashboardFragment); return true; case R.id.nav_notifications: setFragment(notificationsFragment); return true; } return false; } }); } // 切换Fragment private void setFragment(Fragment fragment) { FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); fragmentTransaction.replace(R.id.frameLayout, fragment); fragmentTransaction.commit(); } } ``` `bottom_navigation_menu.xml` 文件: ```xml <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/nav_home" android:icon="@drawable/ic_home" android:title="Home" app:showAsAction="ifRoom" /> <item android:id="@+id/nav_dashboard" android:icon="@drawable/ic_dashboard" android:title="Dashboard" app:showAsAction="ifRoom" /> <item android:id="@+id/nav_notifications" android:icon="@drawable/ic_notifications" android:title="Notifications" app:showAsAction="ifRoom" /> </menu> ``` 在这个示例中,我们创建了一个包含三个Fragment的底部导航栏,分别是HomeFragment、DashboardFragment和NotificationsFragment。当用户点击导航栏中的选项时,我们会使用Intent启动对应的Fragment。你可以根据自己的需求修改/扩展代码。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值