Bootstrap 4轮播幻灯片效果在Wordpress中不起作用

时间:2019-12-02 16:59:53

标签: wordpress bootstrap-4 wordpress-theming

我想在wordpress主题中使用bootstrap 4图片轮播:

https://getbootstrap.com/docs/4.0/components/carousel/

除滑动或淡入淡出效果外,其他所有功能都可以正常工作。图像被替换而没有任何平滑过渡。仅在wordpress主题中会出现此问题。如果我在单个html文件中使用该轮播,那么效果会很好。

我在functions.php中包含了jquery和bootstrap文件:

wp_enqueue_style('bootstrap-style', 'https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css');
wp_enqueue_script( 'jquery','https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', array( 'jquery' ),'',true );
wp_enqueue_script( 'bootstrap-popper','https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js', array( 'jquery' ),'',true );
wp_enqueue_script( 'bootstrap-script','https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js', array( 'jquery' ),'',true );

我已经阅读了一些关于stackoverflow的解决方案,但是仍然无法正常工作。

请给我一些解决方案,谢谢!

0 个答案:

没有答案