0
我真的有更少的CSS經驗,所以我在這條路上新的初學者,我有一個行div和一些卡片上。但是我希望該行能夠在添加卡片時水平滾動。這是它的樣子。無限的水平div滾動 - 反應/ CSS
當卡添加的,它們會自動把下面彼此,但我需要他們並排是側。這是代碼片段;
<div class="row">
<div class="col-sm-6">
<div class="box box-transparent">
<div class="box-body">
<h5 class="text-primary">IF: Add one or more conditions.</h5><br>
<div>
<div class="card bg-color-primary" style="height: 170px; width: 300px; border-color: rgb(30, 144, 255); background-color: white; border-width: 4px;">
<div class="card-content" style="color: black;"><span class="card-title">property</span>
<p>> 21</p>
</div>
<div class="card-action"><a href="javascript:;" style="color: red;">OR</a><a href="javascript:;" style="color: black;">AND</a><a style="color: gray; cursor: pointer;">EDIT</a></div>
</div>
<div class="card bg-color-primary" style="height: 170px; width: 300px; border-color: rgb(30, 144, 255); background-color: white; border-width: 4px;">
<div class="card-content" style="color: black;"><span class="card-title">property</span>
<p><= 45</p>
</div>
<div class="card-action"><a href="javascript:;" style="color: red;">OR</a><a href="javascript:;" style="color: black;">AND</a><a style="color: gray; cursor: pointer;">EDIT</a></div>
</div>
</div>
<div>
<div class="card bg-color-primary" style="height: 170px; width: 300px; border-color: rgb(30, 144, 255); background-color: white; border-width: 4px;">
<div class="card-content" style="color: black;"><span class="card-title">property4</span>
<p>== 45</p>
</div>
<div class="card-action"><a href="javascript:;" style="color: red;">OR</a><a href="javascript:;" style="color: black;">AND</a><a style="color: gray; cursor: pointer;">EDIT</a></div>
</div>
</div>
<div>
<div class="card bg-color-primary" style="height: 170px; width: 300px; border-color: rgb(30, 144, 255); background-color: white; border-width: 4px;">
<div class="card-content" style="color: black;"><span class="card-title">property4</span>
<p>== 38</p>
</div>
<div class="card-action"><a href="javascript:;" style="color: red;">OR</a><a href="javascript:;" style="color: black;">AND</a><a style="color: gray; cursor: pointer;">EDIT</a></div>
</div>
<div class="card bg-color-primary" style="height: 170px; width: 300px; border-color: rgb(30, 144, 255); background-color: white; border-width: 4px;">
<div class="card-content" style="color: black;"><span class="card-title">property</span>
<p>> 89</p>
</div>
<div class="card-action"><a href="javascript:;" style="color: red;">OR</a><a href="javascript:;" style="color: black;">AND</a><a style="color: gray; cursor: pointer;">EDIT</a></div>
</div>
<div class="card bg-color-primary" style="height: 170px; width: 300px; border-color: rgb(30, 144, 255); background-color: white; border-width: 4px;">
<div class="card-content" style="color: black;"><span class="card-title">property</span>
<p>< 56</p>
</div>
<div class="card-action"><a href="javascript:;" style="color: red;">OR</a><a href="javascript:;" style="color: black;">AND</a><a style="color: gray; cursor: pointer;">EDIT</a></div>
</div>
</div>
</div>
</div>
</div>
<!-- react-empty: 150 -->
<div class="col-sm-1" style="border-width: 3px; border-left-style: solid; border-left-color: rgb(51, 51, 51); margin-bottom: -57px; margin-top: -14px;"></div>
<div class="col-sm-5">
<div class="box box-transparent">
<div class="box-body">
<h5 class="text-primary">THEN: Add or select one or more actions.</h5><br>
<div class="card bg-color-success" style="height: 170px; width: 300px; border-color: green; background-color: white; border-width: 4px;">
<div class="card-content" style="color: black;"><span class="card-title">New Action</span>
<p>Click to edit</p>
</div>
<div class="card-action"><a href="javascript:;" style="color: black;">AND</a><a style="color: gray;">EDIT</a></div>
</div>
</div>
</div>
</div>
</div>
而且我認爲它與reactjs無關。 – HyeonJunOh