I have the following system of cards made with bootstrap 4
, each one occupying 4 columns.
ButIneedthemwhentheygomobilesotheylooklikeCarousel
,I'mtryingtouse Owl Carousel , but I need it to check if the resolution is small and displays Carousel
only if it is, otherwise it displays the normal cards.
The problem is that I do not know how I can do it to check the resolution and disappear the element as it.
I tried to use the class d-none d-sm-block
, it even adds the cards
when it is mobile, but I need it when it does not add the Carousel
.
.solucoes-box {
background-color: #fff;
padding: 4.5rem;
margin-bottom: 3rem;
transition: all 500ms ease;
}
.solucoes-box:hover{
box-shadow: 0 0 50px rgba(0, 0, 0, 0.2);
}
.solucoes-box .solucoes-ico {
margin-bottom: 1rem;
color: #004398;
}
.solucoes-box .icone-solucoes {
transition: all 500ms ease;
font-size: 3.5rem;
}
<div class="row">
<div class="col-md-4">
<div class="solucoes-box">
<div class="solucoes-ico">
<span class="icone-solucoes"><i class="fas fa-hand-holding-usd"></i></span>
</div>
<div class="solucoes-content">
<h2 class="s-titulo">Vamos além!
</h2>
<p class="s-descricao text-center">
Silvio Santos Ipsum mah a porta da esperanaam. Ma no existem mulher feiam, existem.
</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="solucoes-box">
<div class="solucoes-ico">
<span class="icone-solucoes"><i class="fas fa-comments"></i></span>
</div>
<div class="solucoes-content">
<h2 class="s-titulo">Mah oee
</h2>
<p class="s-descricao text-center">
Silvio Santos Ipsum ma vai pra l. Ma o Silvio Santos Ipsum muitoam interesanteam. Com ele ma voc vai gerar textuans ha.
</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="solucoes-box">
<div class="solucoes-ico">
<span class="icone-solucoes"><i class="fas fa-handshake"></i></span>
</div>
<div class="solucoes-content">
<h2 class="s-titulo">texto
</h2>
<p class="s-descricao text-center">
Silvio Santos Ipsum ma vai pra l. Ma o Silvio Santos Ipsum muitoam interesanteam. Com ele ma voc vai gerar textuans ha.
</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="solucoes-box">
<div class="solucoes-ico">
<span class="icone-solucoes"><i class="fas fa-balance-scale"></i></span>
</div>
<div class="solucoes-content">
<h2 class="s-titulo">Olha o aviazino
</h2>
<p class="s-descricao text-center">
Silvio Santos Ipsum ma vai pra l. Ma o Silvio Santos Ipsum muitoam interesanteam. Com ele ma voc vai gerar textuans ha.
</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="solucoes-box">
<div class="solucoes-ico">
<span class="icone-solucoes"><i class="fas fa-comments"></i></span>
</div>
<div class="solucoes-content">
<h2 class="s-titulo">Mahoeee
</h2>
<p class="s-descricao text-center">
Silvio Santos Ipsum ma vai pra l. Ma o Silvio Santos Ipsum muitoam interesanteam. Com ele ma voc vai gerar textuans ha.
</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="solucoes-box">
<div class="solucoes-ico">
<span class="icone-solucoes"><i class="fas fa-handshake"></i></span>
</div>
<div class="solucoes-content">
<h2 class="s-titulo">Quem quer dinheiro
</h2>
<p class="s-descricao text-center">
Silvio Santos Ipsum ma vai pra l. Ma o Silvio Santos Ipsum muitoam interesanteam. Com ele ma voc vai gerar textuans ha.
</p>
</div>
</div>
</div>
</div>
EDIT
I was able to get it to insert the owl-carousel
class when the resolution is mobile , but it's not getting screened as it should be, it's all messy.