0
我嘗試使用下面的代碼scrollTop的不引導網格工作
$('html,body').animate({scrollTop:$("#hot").offset().top}, 500);
這個工作正常滾動到DIV,但是當我使用它引導格一起,它只是滾動點點。
下面的樣本HTML和CSS我測試
.mybox {
color: white;
background: black;
min-height: 300px;
}
..
<div class="row">
<h1 class="center" id="popular"> POPULAR DEALS </h1>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<h1 id="hot" class='center'> HOT DEALS </h1>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
<div class="mybox col-lg-4 col-xs-3">test</div>
</div>
</div>
<div class="scrollhere">
</div>
這裏是演示 - https://jsfiddle.net/4nymvo3a/
美麗:D工作,我正在打破我的頭大聲笑 – Vishnu