Мне нужно сделать мой <tbody>
авторазбор, не затрагивая содержимое внутри <thead>
, но у меня возникли проблемы при его реализации.Я не могу поместить класс swiper-wrapper
, поскольку HTML не позволяет тегу <div>
внутри таблицы, а сам Swiper.js не позволяет встроить swiper-wrapper
в класс swiper-slide
, поскольку это нарушит компоновку.
Есть ли какое-нибудь решение для этого?Пожалуйста, посмотрите на мой код.
<div class="table-responsive">
<table class="table table-auto-swiped">
<thead>
<!-- there will be 5 <th> element inside this tag -->
</thead>
<tbody class="swiper-wrapper swiper-slide font-weight-bold">
<!--
there will be 10 rows of data to display for each swiper-slide class
and it will be swiped using autoplay feature provided by Swiper.
but it does not allow swiper-slide class to be inlined with the
swiper-wrapper class, the layout will be messed up.
-->
</tbody>
</table>
</div>
<script>
var autoSwipeTable = new Swiper.default('.table-auto-swiped', {
//
})
</script>