dongya6381 2015-03-04 00:51
浏览 72

如何获得bootstrap背景图像轮播导航工作?

I've just rebuilt the bootstrap carousel so it displays background images in the slider. The problem is in this case I can't get the navigation working. I put the indicators and navigation outside the carousel itself, because inside it was not responding at all. Could anyone please help? The link is szmida.nazwa.pl/mauri/

    <header>

    <div id="myCarousel" class="carousel slide carousel-fade" data-ride="carousel">
       <!-- Indicators -->
       <div class="carousel-inner">
            <div style="background: url(<?php echo get_stylesheet_directory_uri() . '/img/mauri1.jpg'; ?>);" class="active item one"></div>
            <div style="background: url(<?php echo get_stylesheet_directory_uri() . '/img/mauri2.jpg'; ?>);" class="item two"></div>
            <div style="background: url(<?php echo get_stylesheet_directory_uri() . '/img/mauri3.jpg'; ?>);" class="item three"></div>
        </div>
    </div>

<div class="wrapp">
     <a data-slide="prev" href="#myCarousel" class="left carousel-control">‹</a>
     <a data-slide="next" href="#myCarousel" class="right carousel-control">›</a>
     <ol class="carousel-indicators">
         <li  data-target="#myCarousel" data-slide-to="0" class="active"></li>
         <li  data-target="#myCarousel" data-slide-to="1"></li>
         <li  data-target="#myCarousel" data-slide-to="2"></li>
     </ol>

     <div class="container">
        <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 si">

                <nav class="navbar navbar-default" role="navigation">
                <!--<div id="logo">
                    <img src="<?php echo get_stylesheet_directory_uri() . '/img/logo.png'; ?>" />
                </div>-->
                       <div class="navbar-header">
                         <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                           <h5>menu</h5>
                         </button>
                       </div>

                       <?php
                       wp_nav_menu( array(
                           'menu'              => 'Header Menu',
                           'theme_location'    => 'menu_header',
                           'depth'             => 2,
                           'container'         => 'div',
                           'container_class'   => 'collapse navbar-collapse',
                           'container_id'      => 'bs-example-navbar-collapse-1',
                           'menu_class'        => 'menu',
                           'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
                           'walker'            => new wp_bootstrap_navwalker())
                       );
                       ?>

                   </nav>
                   <div class="logo_duze">
                       <img src="<?php echo get_stylesheet_directory_uri() . '/img/logo_duze.png'; ?>" />
                   </div>
               </div>
           </div>
       </div>
   </div> 
</header>

</div>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
    • ¥20 软件测试决策法疑问求解答
    • ¥15 win11 23H2删除推荐的项目,支持注册表等
    • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
    • ¥15 qt6.6.3 基于百度云的语音识别 不会改
    • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
    • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
    • ¥15 lingo18勾选global solver求解使用的算法
    • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
    • ¥20 测距传感器数据手册i2c