Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/407.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 回流黑客的引导列(创建类似netflix的水平滑块)_Javascript_Jquery_Html_Css_Twitter Bootstrap - Fatal编程技术网

Javascript 回流黑客的引导列(创建类似netflix的水平滑块)

Javascript 回流黑客的引导列(创建类似netflix的水平滑块),javascript,jquery,html,css,twitter-bootstrap,Javascript,Jquery,Html,Css,Twitter Bootstrap,我正在尝试用引导和css重新创建netflix水平滑块/旋转木马,如下所示: 我还没有设置css转换/动画,但我已经使用宽度调整使元素在不回流的情况下重复。我计划使用javascript重复这些元素,并使容器的宽度仅与内部元素的宽度相同。这是我的代码: html 这是一种超级jank方法吗?我对网络开发不是很有经验 <div class="container"> <div class="row"> <div class="col-xs-2 hero-unit

我正在尝试用引导和css重新创建netflix水平滑块/旋转木马,如下所示:

我还没有设置css转换/动画,但我已经使用宽度调整使元素在不回流的情况下重复。我计划使用javascript重复这些元素,并使容器的宽度仅与内部元素的宽度相同。这是我的代码:

html

这是一种超级jank方法吗?我对网络开发不是很有经验

<div class="container">
<div class="row">
    <div class="col-xs-2 hero-unit">
        <h1>Bootstrap jsFiddle Skeleton</h1>
        <p>Fork this fiddle to test your Bootstrap stuff.</p>
    </div>
    <div class="hero-unit col-xs-2">
        <h1>Bootstrap jsFiddle Skeleton</h1>
        <p>Fork this fiddle to test your Bootstrap stuff.</p>
    </div>
    <div class="hero-unit col-xs-2">
        <h1>Bootstrap jsFiddle Skeleton</h1>
        <p>Fork this fiddle to test your Bootstrap stuff.</p>
    </div>
    <div class="hero-unit col-xs-2">
        <h1>Bootstrap jsFiddle Skeleton</h1>
        <p>Fork this fiddle to test your Bootstrap stuff.</p>
    </div>
    <div class="hero-unit col-xs-2">
        <h1>Bootstrap jsFiddle Skeleton</h1>
        <p>Fork this fiddle to test your Bootstrap stuff.</p>
    </div>
    <div class="hero-unit col-xs-2">
        <h1>Bootstrap jsFiddle Skeleton</h1>
        <p>Fork this fiddle to test your Bootstrap stuff.</p>
    </div>    
</div>
</diV>
@import url('http://twitter.github.com/bootstrap/assets/css/bootstrap.css');

.container{
    height: 150px;
    background: grey;
    width: 500%
}
.hero-unit {
    display:inline-block;
    background-color:red;
    height: 100px;
}