我的代码结构是:
HTML
<div class="benefit-container">
<div class="benefit-title-container">
<div class="benefit-title">Why use Citrix Service Providers to Help Solve Your Business Problems?</div>
</div>
<div class="benefit-scroll-container">
<div id="benefit-support" class="benefit-sub-title">Support</div>
<div id="benefit-access" class="benefit-sub-title">Access</div>
<div id="benefit-service" class="benefit-sub-title">Service</div>
<div id="benefit-business-model" class="benefit-sub-title">Business Model</div>
<div id="benefit-choice" class="benefit-sub-title">Choice</div>
</div>
</div>
CSS
div.benefit-scroll-container{
position: relative;
margin-bottom: 36px;
overflow-x: visible;
white-space: nowrap;
text-align: center;
border-top: 1px solid #cfd1d3;
border-bottom: 1px solid #cfd1d3;
line-height: 44px;
padding-left: 10px;
padding-right: 10px;
}
我的想法是:当触摸移动插件时,我将改变好处滚动容器的位置。
当我设置&#34; good-scroll-container&#34;具有以下内容的类并向左滑动。我发现有些部分丢失了,如下图所示。
div.benefit-scroll-container{
overflow-x: hidden;
}
如果我设置&#34; good-scroll-container&#34;以下课程。
div.benefit-scroll-container{
overflow-x: visible;
}
然后我向左滑动,发现整个页面将被向左滑动,一些插件会丢失边框,如下图所示。
如何解决此问题?
答案 0 :(得分:0)
给div.benefit-scroll-container一个宽度,然后像这样提供scroll属性:
div.benefit-scroll-container {
width: 1000px; //or 100% as per your use
overflow-x: scroll;
}