問題タブ [swiperjs]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - アイテム (固定幅 - swiper-slide) を適切に中央揃えするにはどうすればよいですか?
スライドを の中央に配置しようとしていswiper-container
ます。最終バージョンは、次の図のようになる必要があります。
SwiperJs - 最終バージョン (大、中、小の画面サイズ:)
すべてのページネーション ドットは自動的にカードと関連付けられる必要があります。
これを達成する方法がわかりません。カードが正しく中央に配置されません。
確かではありませんが、固定幅のためにセンタリングが機能しない可能性がありswiper-slide
ますか? スライドの幅を固定しないと、実際には適切に中央に配置されますが、もちろん、カードのデザインは「押しつぶされ」ます。
これが私のコードです:
Swiper-JS
CSS
HTML