문제

I've searched but haven't been able to find out a way to preload images using Bootstrap Carousel. I am building up a portfolio site with a lot of images and right now Bootstrap carousel works properly after all the images are loaded.

Any ideas?

도움이 되었습니까?

해결책

I'm pretty sure that the images in the Bootstrap carousel aren't loaded dynamically, but loaded with the page. Therefore there isn't any reason for you to preload.

Preloading is used when images are loaded onto the page dynamically. When this happens, the page has to load this image separate from the page, causing an undesirable lag between dynamic addition and image downloading/appearing.

Because bootstrap's carousel has it's images included in the HTML and simply hidden with javascript, the images are loaded with the page, resulting in whatever preloading would achieve for you.

tl;dr: You can't it's already done for you.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top