pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    <small id='0g4oC'></small><noframes id='0g4oC'>

  1. <i id='0g4oC'><tr id='0g4oC'><dt id='0g4oC'><q id='0g4oC'><span id='0g4oC'><b id='0g4oC'><form id='0g4oC'><ins id='0g4oC'></ins><ul id='0g4oC'></ul><sub id='0g4oC'></sub></form><legend id='0g4oC'></legend><bdo id='0g4oC'><pre id='0g4oC'><center id='0g4oC'></center></pre></bdo></b><th id='0g4oC'></th></span></q></dt></tr></i><div class="znr5t7n" id='0g4oC'><tfoot id='0g4oC'></tfoot><dl id='0g4oC'><fieldset id='0g4oC'></fieldset></dl></div>

    <tfoot id='0g4oC'></tfoot>

      • <bdo id='0g4oC'></bdo><ul id='0g4oC'></ul>
    1. <legend id='0g4oC'><style id='0g4oC'><dir id='0g4oC'><q id='0g4oC'></q></dir></style></legend>
    2. 如何將 Bootstrap Carousel 圖像標題放置在 carousel d

      How to place Bootstrap Carousel image captions outside the carousel div?(如何將 Bootstrap Carousel 圖像標題放置在 carousel div 之外?)
          <tbody id='8F6D1'></tbody>

        <legend id='8F6D1'><style id='8F6D1'><dir id='8F6D1'><q id='8F6D1'></q></dir></style></legend>

          <tfoot id='8F6D1'></tfoot>

            1. <i id='8F6D1'><tr id='8F6D1'><dt id='8F6D1'><q id='8F6D1'><span id='8F6D1'><b id='8F6D1'><form id='8F6D1'><ins id='8F6D1'></ins><ul id='8F6D1'></ul><sub id='8F6D1'></sub></form><legend id='8F6D1'></legend><bdo id='8F6D1'><pre id='8F6D1'><center id='8F6D1'></center></pre></bdo></b><th id='8F6D1'></th></span></q></dt></tr></i><div class="hd7vpjt" id='8F6D1'><tfoot id='8F6D1'></tfoot><dl id='8F6D1'><fieldset id='8F6D1'></fieldset></dl></div>
            2. <small id='8F6D1'></small><noframes id='8F6D1'>

                <bdo id='8F6D1'></bdo><ul id='8F6D1'></ul>
                本文介紹了如何將 Bootstrap Carousel 圖像標題放置在 carousel div 之外?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                如果這已經在此處的任何地方被覆蓋,我們深表歉意.我嘗試搜索,但只找到與輪播代碼中的樣式和定位標題相關的主題......

                所以,我有一個包含三列的布局:

                1. 左列包含與每個頁面/項目相關的一般信息.
                2. 中間一列包含一個帶有圖像的 Bootstrap 3 輪播圖.
                3. 右欄是我計劃在中央輪播中顯示與圖像相關的所有標題的位置.

                我不太明白如何讓字幕在右欄中工作.澄清一下,標題將隨著每個輪播幻燈片而變化,就像它們在默認輪播設置中所做的一樣.我基本上是想將圖片的標題移到右欄中.

                我使用 Kirby (www.getkirby.com) 作為我的 CMS,我使用 foreach 循環來獲取輪播中圖像等的代碼.這是我當前的代碼,包括標題部分(我正在嘗試移動...)

                <?php $imagepage = $page->children()->first() ?><?php if($imagepage->hasImages()): ?><div id="merry-go-round" class="旋轉木馬幻燈片"><!-- 幻燈片包裝器--><div class="carousel-inner"><?php $n=0;foreach($imagepage->images() as $image): $n++;?><div class="item<?php if($n==1) echo 'active' ?>"><img style="display:block; margin-left: auto; margin-right: auto;"src="<?php echo $image->url() ?>"alt="<?php echo html($image->title()) ?>"class="img-responsive"><div class="carousel-caption"><?php echo $image->img_title() ?></div>

                <?php endforeach ?><?php endif ?></div><!--/carousel-inner --><!-- 控件--><a class="left carousel-control" href="#merry-go-round" data-slide="prev"></a><a class="right carousel-control" href="#merry-go-round" data-slide="next"></a></div><!--/merry-go-round --></div><!--/#center --><div id="right" class="col-xs-12 col-sm-3 col-md-2"><p>這是我嘗試放置輪播字幕的地方...</p></div><!--/#right -->

                我已經盡力了,但我完全沒有想法.我想也許我可以做一些事情,比如讓標題成為一個變量:

                <?php $test_caption = $image->img_title() ?><?php echo $test_caption ?>

                但這在輪播區域之外不起作用.我猜是它不能在 foreach 循環之外工作?

                無論如何,如果有人有任何建議,我將不勝感激.我一直在學習 PHP,但我不知道任何 javascript,所以我希望有一個解決方案.再說一次,我使用的是 Bootstrap 3.

                這是我制作的小提琴的鏈接(沒有所有的 php 內容……):

                http://jsfiddle.net/4tMfJ/2/

                解決方案

                基于 Twitter Bootstrap Carousel - 訪問當前索引

                您可以將以下代碼添加到您的 javascript 中(加載 jquery/bootstrap 后)

                $(function() {$('.carousel').carousel();var caption = $('div.item:nth-child(1) .carousel-caption');$('#right h1').html(caption.html());caption.css('顯示','無');$(".carousel").on('slide.bs.carousel', function(evt) {var caption = $('div.item:nth-child(' + ($(evt.relatedTarget).index()+1) + ') .carousel-caption');$('#right h1').html(caption.html());caption.css('顯示','無');});});

                另見:http://jsfiddle.net/4tMfJ/3/

                apologies if this has been covered anywhere here. I tried searching, but only found topics related to styling and positioning captions within the carousel code…

                So, I have a layout that contains three columns:

                1. The left column contains general information related to each page/project.
                2. The center column contains a Bootstrap 3 carousel with images.
                3. The right column is where I was planning on displaying all the captions related to the images in the center Carousel.

                I can't quite figure out how to get the captions working in the right column. To clarify, the captions will change with each carousel slide, just as they do in the default carousel setting. I basically want to move the captions off the image, and into the right column.

                I am using Kirby (www.getkirby.com) as my CMS and I am using a foreach loop to get the code for the images, etc. in the carousel. Here is my current code, including the caption section (which I am trying to move…)

                <div id="center" class="col-xs-12 col-sm-6 col-md-8">
                    <?php $imagepage = $page->children()->first() ?>
                    <?php if($imagepage->hasImages()): ?> 
                    <div id="merry-go-round" class="carousel slide">
                        <!-- Wrapper for slides -->
                        <div class="carousel-inner">
                            <?php $n=0; foreach($imagepage->images() as $image): $n++; ?>               
                            <div class="item<?php if($n==1) echo ' active' ?>">
                                <img style="display:block; margin-left: auto; margin-right: auto;" src="<?php echo $image->url() ?>" alt="<?php echo html($image->title()) ?>" class="img-responsive">
                                <div class="carousel-caption"><?php echo $image->img_title() ?></div>
                            </div>
                    <?php endforeach ?>
                    <?php endif ?>
                        </div><!-- /carousel-inner -->
                        <!-- Controls -->
                        <a class="left carousel-control" href="#merry-go-round" data-slide="prev"></a>
                        <a class="right carousel-control" href="#merry-go-round" data-slide="next"></a>
                    </div><!-- /merry-go-round -->
                </div><!-- /#center -->
                
                <div id="right" class="col-xs-12 col-sm-3 col-md-2">
                    <p>THIS IS WHERE I AM TRYING TO PUT THE CAROUSEL CAPTIONS…</p>
                </div><!-- /#right -->
                

                I've tried by best but I am all out of ideas. I thought maybe I could do something like make the caption a variable:

                <?php $test_caption = $image->img_title() ?><?php echo $test_caption ?>
                

                but this doesn't work outside the carousel area. I'm guessing it's that it won't work outside of the foreach loop?

                Anyway, if anyone has any suggestions I would really appreciate it. I'm learning PHP as I go along, but I don't know any javascript so I'm hoping there's a solution outside that. And again, I'm using Bootstrap 3.

                Here is a link to a fiddle I made (without all the php stuff…):

                http://jsfiddle.net/4tMfJ/2/

                解決方案

                Based on Twitter Bootstrap Carousel - access current index

                You can add the code below to your javascript (after loading jquery / bootstrap)

                $(function() {
                $('.carousel').carousel();
                var caption = $('div.item:nth-child(1) .carousel-caption');
                $('#right h1').html(caption.html());
                caption.css('display','none');
                $(".carousel").on('slide.bs.carousel', function(evt) {
                
                
                   var caption = $('div.item:nth-child(' + ($(evt.relatedTarget).index()+1) + ') .carousel-caption');
                   $('#right h1').html(caption.html());
                   caption.css('display','none');
                });
                });
                

                also see: http://jsfiddle.net/4tMfJ/3/

                這篇關于如何將 Bootstrap Carousel 圖像標題放置在 carousel div 之外?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                PHP PDO ODBC connection(PHP PDO ODBC 連接)
                Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                    <tbody id='BmMMC'></tbody>
                  <i id='BmMMC'><tr id='BmMMC'><dt id='BmMMC'><q id='BmMMC'><span id='BmMMC'><b id='BmMMC'><form id='BmMMC'><ins id='BmMMC'></ins><ul id='BmMMC'></ul><sub id='BmMMC'></sub></form><legend id='BmMMC'></legend><bdo id='BmMMC'><pre id='BmMMC'><center id='BmMMC'></center></pre></bdo></b><th id='BmMMC'></th></span></q></dt></tr></i><div class="n7xj7pv" id='BmMMC'><tfoot id='BmMMC'></tfoot><dl id='BmMMC'><fieldset id='BmMMC'></fieldset></dl></div>
                    <bdo id='BmMMC'></bdo><ul id='BmMMC'></ul>

                    • <tfoot id='BmMMC'></tfoot>

                        <small id='BmMMC'></small><noframes id='BmMMC'>

                      1. <legend id='BmMMC'><style id='BmMMC'><dir id='BmMMC'><q id='BmMMC'></q></dir></style></legend>
                          主站蜘蛛池模板: 农业四情_农业气象站_田间小型气象站_智慧农业气象站-山东风途物联网 | 广州中央空调回收,二手中央空调回收,旧空调回收,制冷设备回收,冷气机组回收公司-广州益夫制冷设备回收公司 | 招商帮-一站式网络营销服务|搜索营销推广|信息流推广|短视视频营销推广|互联网整合营销|网络推广代运营|招商帮企业招商好帮手 | 对夹式止回阀_对夹式蝶形止回阀_对夹式软密封止回阀_超薄型止回阀_不锈钢底阀-温州上炬阀门科技有限公司 | 台湾阳明固态继电器-奥托尼克斯光电传感器-接近开关-温控器-光纤传感器-编码器一级代理商江苏用之宜电气 | 派克防爆伺服电机品牌|国产防爆伺服电机|高低温伺服电机|杭州摩森机电科技有限公司 | 恒压供水控制柜|无负压|一体化泵站控制柜|PLC远程调试|MCGS触摸屏|自动控制方案-联致自控设备 | 深圳昂为官网-气体分析仪,沼气分析仪,动态配气仪,气体传感器厂家 | 天津云仓-天津仓储物流-天津云仓一件代发-顺东云仓 | 高低温万能试验机-复合材料万能试验机-馥勒仪器 | 橡胶接头_橡胶软接头_套管伸缩器_管道伸缩器厂家-巩义市远大供水材料有限公司 | LED投光灯-工矿灯-led路灯头-工业灯具 - 山东普瑞斯照明科技有限公司 | 南京欧陆电气股份有限公司-风力发电机官网 | 异噻唑啉酮-均三嗪-三丹油-1227-中北杀菌剂厂家 | 网站建设,北京网站建设,北京网站建设公司,网站系统开发,北京网站制作公司,响应式网站,做网站公司,海淀做网站,朝阳做网站,昌平做网站,建站公司 | 企业管理培训,企业培训公开课,企业内训课程,企业培训师 - 名课堂企业管理培训网 | 电动葫芦|防爆钢丝绳电动葫芦|手拉葫芦-保定大力起重葫芦有限公司 | lcd条形屏-液晶长条屏-户外广告屏-条形智能显示屏-深圳市条形智能电子有限公司 | 超声骨密度仪-骨密度检测仪-经颅多普勒-tcd仪_南京科进实业有限公司 | 衬四氟_衬氟储罐_四氟储罐-无锡市氟瑞特防腐科技有限公司 | sfp光模块,高速万兆光模块工厂-性价比更高的光纤模块制造商-武汉恒泰通 | CXB船用变压器-JCZ系列制动器-HH101船用铜质开关-上海永上船舶电器厂 | 低温等离子清洗机(双气路进口)-嘉润万丰 | 越南专线物流_东莞国际物流_东南亚专线物流_行通物流 | 不锈钢水箱生产厂家_消防水箱生产厂家-河南联固供水设备有限公司 | 不锈钢钢格栅板_热浸锌钢格板_镀锌钢格栅板_钢格栅盖板-格美瑞 | 手机游戏_热门软件app下载_好玩的安卓游戏下载基地-吾爱下载站 | 【直乐】河北石家庄脊柱侧弯医院_治疗椎间盘突出哪家医院好_骨科脊柱外科专业医院_治疗抽动症/关节病骨伤权威医院|排行-直乐矫形中医医院 | 合肥升降机-合肥升降货梯-安徽升降平台「厂家直销」-安徽鼎升自动化科技有限公司 | 轴承振动测量仪电箱-轴承测振动仪器-测试仪厂家-杭州居易电气 | 红立方品牌应急包/急救包加盟,小成本好项目代理_应急/消防/户外用品加盟_应急好项目加盟_新奇特项目招商 - 中红方宁(北京) 供应链有限公司 | 重庆网站建设,重庆网站设计,重庆网站制作,重庆seo,重庆做网站,重庆seo,重庆公众号运营,重庆小程序开发 | 防水套管-柔性防水套管-刚性防水套管-上海执品管件有限公司 | 工业机械三维动画制作 环保设备原理三维演示动画 自动化装配产线三维动画制作公司-南京燃动数字 聚合氯化铝_喷雾聚氯化铝_聚合氯化铝铁厂家_郑州亿升化工有限公司 | 河南空气能热水器-洛阳空气能采暖-洛阳太阳能热水工程-洛阳润达高科空气能商行 | 压滤机滤板_厢式_隔膜_板框压滤机滤板厂家价格型号材质-大凯环保 | 废气处理_废气处理设备_工业废气处理_江苏龙泰环保设备制造有限公司 | 营养师网,营养师考试时间,报名入口—网站首页 | 磁力抛光机_磁力研磨机_磁力去毛刺机_精密五金零件抛光设备厂家-冠古科技 | 全自动真空上料机_粉末真空上料机_气动真空上料机-南京奥威环保科技设备有限公司 | 河南正规膏药生产厂家-膏药贴牌-膏药代加工-修康药业集团官网 |