bxSlider won't allow HTML text within slides

前端 未结 1 1289
遥遥无期
遥遥无期 2021-01-23 16:44

I want each slide to have an image on the left and text sitting to the right of it, but it just won\'t work. The slider works just fine when there are only images but as soon as

相关标签:
1条回答
  • 2021-01-23 17:21

    You can use divs instead of li tags to order your slides. Here is an example with Foundation 5 Framework applied to the slider simply to generate rows/columns.

    <div class="bxslider">
    <div class="row collapse slide-pane">
        <div class="small-6 medium-6 large-6 columns">
            <img src="http://placehold.it/350x250/5E7074/FFFFFF&text=Slide-One" />
        </div>
        <div class="small-6 medium-6 large-6 columns text-pane">       
    <h1>Are you ready for the truth?</h1>
        </div>
    </div>
    <div class="row collapse slide-pane">
        <div class="small-6 medium-6 large-6 columns">
            <img src="http://placehold.it/350x250/5E7074/FFFFFF&text=Slide-Two" />
        </div>
        <div class="small-6 medium-6 large-6 columns text-pane">       
    <h1>Are you ready for the truth?</h1>
        </div>
    </div>
    <div class="row collapse slide-pane">
        <div class="small-6 medium-6 large-6 columns">
            <img src="http://placehold.it/350x250/5E7074/FFFFFF&text=Slide-Three" />
        </div>
        <div class="small-6 medium-6 large-6 columns text-pane">          
    <h1>Are you ready for the truth?</h1>
        </div>
    </div>
    

    Fiddle: http://jsfiddle.net/defonic/E8NgR/

    0 讨论(0)
提交回复
热议问题