Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Bootstrap 3旋转木马选择特定div,自定义设置_Javascript_Jquery_Twitter Bootstrap_Twitter Bootstrap 3 - Fatal编程技术网

Javascript Bootstrap 3旋转木马选择特定div,自定义设置

Javascript Bootstrap 3旋转木马选择特定div,自定义设置,javascript,jquery,twitter-bootstrap,twitter-bootstrap-3,Javascript,Jquery,Twitter Bootstrap,Twitter Bootstrap 3,我的处境很棘手。我有动态填充的内容,我想在Bootstrap 3旋转木马中进行布局。问题是,在动态字符串中,只有3/4的字符串应该放在旋转木马中。下面是一个简单的例子 <?php if ($imagePosition == 'left'): ?> <div class="hero-item item no-carousel"> Conent I don't want to be shown on the carousel </div&

我的处境很棘手。我有动态填充的内容,我想在Bootstrap 3旋转木马中进行布局。问题是,在动态字符串中,只有3/4的字符串应该放在旋转木马中。下面是一个简单的例子

<?php if ($imagePosition == 'left'): ?>
    <div class="hero-item item no-carousel">
        Conent I don't want to be shown on the carousel
    </div>
    <div class="hero-item item show">
        I want this to be shown in the carousel
    </div>
<?php elseif ($imagePosition == "background"): ?>
    <div class="hero-item item show">
        I want this to be shown in the carousel
    </div>
<?php elseif ($imagePosition == "right"): ?>
    <div class="hero-item item show">
        I want this to be shown in the carousel
    </div>
    <div class="hero-item item no-carousel">
        Conent I don't want to be shown on the carousel
    </div>
<?php endif; ?>
因此,输出可能是

<div class="hero-item item no-carousel">Content I don't want to be shown on the carousel</div>
<div class="hero-item item show">I want this to be shown in the carousel</div>
<div class="hero-item item show">I want this to be shown in the carousel</div>
<div class="hero-item item no-carousel">Conent I don't want to be shown on the carousel</div>

如何让引导转盘只显示我要显示的项目,例如,类为“show”的项目?

因此您希望转盘的左右两侧都有静态内容?另外,我认为您需要从问题中删除引导标签。该标记指的是启动时在服务器上运行的引导过程,它特别指出:不要与描述中的Twitter引导混淆。简单地应用display:none,不管你不想显示什么。应用display none仍然会显示一个空白点不幸的是jme11,如果我不清楚的话,很抱歉。所有的内容都必须放在旋转木马中,我只是不能显示其中的某些divcarousel@TilwinJoy我基本上使用了.no carousel{display:none!important;}这不起作用,有一个空白点,carousel仍然试图在其上放置“active”类。