Colorbox Scrollbars

故事扮演 提交于 2019-12-14 02:03:39

问题


I have an image that opens in a a lightbox (Colorbox is the script). When the image opens I added a CSS3 Animation. Works great but at first the lightbox has scrollbars which disappear once the animation is complete.

How do I prevent the lightbox from showing scrollbars at all?

Code:

#start{
  /* Width and Height of the Image */
  width:526px;
  height:450px;
}

<div class="hide">
<div id="start">
 <img src="/Images/designs/start-large.jpg" class="animated rollIn"> 
</div>
</div>

回答1:


You could try to add overflow:hidden; to your CSS style of the div / img. Or try overflow:visible; if it cuts off something.




回答2:


#cboxLoadedContent{overflow:hidden !important;}

This is working for me.




回答3:


Set the colorbox setting scrolling to false to disable scrollbars on content.




回答4:


You can use colorbox.resize() to automatic calculate its size or use overflow hidden to the parents of your content.
Both ways works.




回答5:


Add scrolling: false

$.colorbox({
  inline:true, 
  width:'95%',
  scrolling: false // *********
});


来源:https://stackoverflow.com/questions/13037674/colorbox-scrollbars

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!