Bootstrap 4-带图像列和文本列的轮播

时间:2018-07-25 20:53:32

标签: bootstrap-4 carousel

我已经搜索过该网站和Google,无法找到适合我的情况的解决方案。我正在我的网站布局上工作,但一直无法正常显示。当前,图像将相应显示和缩放(当我在Chrome开发人员模式下从桌面收缩到iPhone 5时),但是无论屏幕大小如何,文本都将继续下降到图像下方。我希望文本在其列内是合理的,但是如果屏幕尺寸缩小(因此sm),则该文本应落在轮播中

     <!-- Bootstrap core CSS -->
    <link href="http://getbootstrap.com/docs/4.1/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom styles for this page -->
    <link href="style/landing.css" rel="stylesheet">
    <link href="style/carousel_indiv.css" rel="stylesheet" >
<!--begin code segment-->    
    <div class="container-fluid">
    <div class="container">
        <div class="col-xs-12">
            <div id="iOSdemo" class="carousel slide" data-ride="carousel" data-wrap="true">
            <!-- Indicators -->
            <ol class="carousel-indicators">
                <li data-target="#iOSdemo" data-slide-to="0" class="active"></li>
                <li data-target="#iOSdemo" data-slide-to="1"></li>
                <li data-target="#iOSdemo" data-slide-to="2"></li>
            </ol>

            <!-- Wrapper for slides -->
            <div class="carousel-inner">
                <div class="carousel-item active">
                    <div class=row>
                        <div class="col-sm-7">
                        <img  class="img-fluid" src="/images/IssueListScreenshot.png" alt="home screen">
                        </div><!--larger image column-->
                        <div class="col-sm-5">
                            <p class="text-fluid">If it’s not on here we’re always open to suggestions for what we should add. Additional representative text information. Paragraph describing page feature.</p>
                        </div><!--smaller text column-->
                    </div><!--row-->
                </div><!--initial slide-->

                <div class="carousel-item">
                    <div class="row">
                        <div class="col-sm-7">
                        <img class="img-fluid" src="/images/IssueDetailScreenshot.png" alt="issues page">
                        </div>
                        <div class="col-sm-5">
                                <p class="text">Find the issue.</p>
                            </div>
                    </div><!--row-->
                </div>

                <div class="carousel-item">
                    <div class="row">
                        <div class="col-sm-7">
                        <img class="img-fluid" src="/images/DiscussionScreenshot.png" alt="discussion page">
                        </div>
                        <div class="col-sm-5">
                        <p class="text">Find the issues that mean the most to you.</p>
                        </div>
                    </div><!--row-->
                </div>
            </div>

            <!-- Left and right controls -->
            <a class="carousel-control-prev" href="#iOSdemo" role="button" data-slide="prev">
                <span class="carousel-control-prev-icon"></span>
                <span class="sr-only">Previous</span>
            </a>
            <a class="carousel-control-next" href="#iOSdemo" role="button" data-slide="next">
                <span class="carousel-control-next-icon"></span>
                <span class="sr-only">Next</span>
            </a>
            </div>
        </div>
    </div>
</div>

感谢您的帮助。如果我可以做些什么来帮助这个过程,请告诉我可能是什么!

0 个答案:

没有答案