我在页面上使用光滑的滑块。所有工作都很好,但有一件事情:当我拖动幻灯片时,有时图像或文本会弹起,这看起来真的很糟糕。我该怎么做才能避免该问题?
这是我的code
<section class="portfolio" id="portfolio">
<div class="container" style="height:100px">
<div class="row">
<div class="col-lg-12"></div>
</div>
</div>
<div id="portfolio_slider">
<div id="item">
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-3 text-right">
<div id="project_name">
PROJECT<br />
NAME
</div>
<div id="project-info">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tortor erat,
laoreet ut ullamcorper vel, fermentum vel ex. Donec convallis leo sit amet auctor
rutrum. Nullam accumsan risus at quam porttitor ec tortor erat, laoreet ut
ullamcorper vel, fermentum vel tristique.
</div>
<div id="read_more"><a href="#" data-toggle="modal">Read More...</a></div>
</div>
<div class="col-lg-7 col-lg-offset-1" id="project_image">
<img class="img-responsive shadow" src="http://i.imgur.com/35Lun7R.jpg" />
</div>
<div class=" col-lg-1 col-md-1 social_buttons">
<div class="centered">
<div class="flex-item" style="padding-bottom: 50px;">
<a href="#"><i class="fa fa-facebook"></i></a>
</div>
<div class="flex-item" style="padding-bottom: 50px;">
<a href="#"><i class="fa fa-twitter"></i></a>
</div>
<div class="flex-item">
<a href="#"><i class="fa fa-instagram"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
最佳答案
在代码笔中,在CSS中,只有一个类,#portfolio_slider #item
与margin: top 20px
一起将其删除。