简体   繁体   English

单击引导轮播中的下一个或上一个时,图像会跳转

[英]Image jumps when click on next or previous on bootstrap carousel

I am working on a site and integrated the bootstrap carousel. 我正在一个站点上工作,并集成了Bootstrap轮播。 Everything is working well, except for a one thing that: When I click on next or previous icon, images will jump a little bit and I feel very annoying about it. 一切都运行良好,但有一个例外:当我单击下一个或上一个图标时,图像会跳一点,我对此感到非常烦恼。 I tried every solutions which I have searched and applied but it still didn't work. 我尝试了所有已搜索和应用的解决方案,但仍然无法正常工作。 Can anybody help me with this problem, the url as below: https://test5.extensionesdepelobaratas.net/hair-blog/ You will see the first carousel which have number from 1 to 8. Look forward to hearing solutions from everybody. 有人可以帮我解决这个问题吗,网址如下: https : //test5.extensionesdepelobaratas.net/hair-blog/您将看到第一个轮播,编号为1到8。期待大家的解决方案。

Thank you very much. 非常感谢你。

It looks like there are a handful of elements with the class .item which are not properly being transitioned when it comes to it's attributes and the active class ones which are being applied thereafter. 看起来有一些元素具有.item类,当涉及到其属性时,这些元素未正确转换;而在其后将应用活动类。

If you add the following CSS to your .carousel-inner .item elements, all of the values will be transitioned properly. 如果将以下CSS添加到.carousel-inner .item元素,则所有值都将正确过渡。

.carousel-inner .item { transition: all 0.5s ease !important; }

Tested this with the existing website and there is no more 'jumpiness' when it comes to the elements sliding in. Instead, they grow rather than jump to the size which the carousel is setting them as. 在现有的网站上对此进行了测试,当元素滑入时不再有“跳跃”的感觉。相反,它们会增长而不是跳到轮播设置的大小。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM