【问题标题】:Twitter Bootstrap 3.0 Carousel formatting with textTwitter Bootstrap 3.0 带文本的轮播格式
【发布时间】:2013-12-13 03:26:32
【问题描述】:

我正在尝试使用某些格式使 twitter 引导轮播 (3.0+) 工作,因此我循环浏览右侧的图像/左侧的文本 - 左侧的图像,然后是右侧的文本。

渲染时(rails 3.13),网格系统似乎被暂停了——图像卡在左边框上,这是我的小提琴:

http://jsfiddle.net/jaytho/gvAMz/2/

但该示例是直接从引导网站中提取出来的:

<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
    <li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
    <div class="item active">
        <div class="row">
            <div class="col-md-5-offset-1">
                <img src="http://ndevilla.free.fr/lena/lena.jpg" alt="..."></img>
                <div class="carousel-caption">Caption</div>
                <div class="col-md-6">
                     <h1>Some profound text here</h1>

                    <p>this is an image from my image processing past</p>
                </div>
            </div>
        </div>
    </div>
    <div class="item">
        <img src="http://perception.csl.illinois.edu/gpca/applications/baboon_small.jpg" alt="..."></img>
    </div>
    <div class="item">
        <img src="https://www.google.com/images/srpr/logo11w.png" alt="..."></img>
    </div>
    <!-- Controls --> <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>

</div>

这是设计使然吗? (这是我的第一篇文章)

【问题讨论】:

    标签: html css twitter-bootstrap


    【解决方案1】:

    您的行中有太多不同的 div 和类。

    这是一个示例,它使用每个 .row 或“幻灯片”中的两个 .col-xs-6 来完成您的请求。使用 Bootstrap 的 Carousel 示例中的示例代码和 cmets - http://goo.gl/v2qY3J

    看看-http://cdpn.io/wcpuf

    <div class="row">
        <div class="col-xs-6">
            <img alt="First Slide" src="http://placekitten.com/g/350/280">
        </div>
        <div class="col-xs-6">
            <h1>Temporary Title Text on the Right</h1>
            <p>Some paragraph copy for fun</p>
        </div>
    </div><!-- end row -->
    

    【讨论】:

    • 你的工作方式相同:将左侧图像一直卡到左边框并忽略任何容器网格格式(我有这么多的原因)。我的解决方法是将“text-right”应用于任何左侧图像。我的期望是,如果我在您的示例中应用“col-xs-offset-1”,则图像将被覆盖。
    • hmm 没有想到您要完成的工作。你能用 Photoshop 拍摄你想要完成的事情吗?
    • 看起来我的图像格式问题是由于这个原因:stackoverflow.com/questions/8078649/…
    猜你喜欢
    • 1970-01-01
    • 2012-08-15
    • 1970-01-01
    • 1970-01-01
    • 2014-12-04
    • 1970-01-01
    • 2013-09-21
    • 2012-09-13
    • 1970-01-01
    相关资源
    最近更新 更多