1
Well I wanted to create a box where when clicked a Hoover appears and it has a link: ex:
as is mine so far :
html code:
<section id="promo">
<?php
$consulta = $pdo->prepare("SELECT * FROM produtohome");
$consulta -> execute();
$linhas = $consulta -> rowCount();
foreach($consulta as $mostra):
?>
<div class="card">
<img class="skin"src="images/<?= $mostra['produto_img']?>" alt="Nome da Empresa: <?= $mostra['produto_nome']?>" title="Nome da Empresa: <?= $mostra['produto_nome']?>">
<h1 class="color-white text-center font-text-light-med font-weight-heavy bgcolor-black"><?= $mostra['produto_nome']?></h1>
<p class="bgcolor-gray text-center color-dark-full font-text-light-med">Por: R$ <?= number_format($mostra['produto_preco'], 2,',','.')?></p>
<button class="bgcolor-red text-center btn"><a href="comprar.php?prod=<?= $mostra['produto_id']?>">Comprar</a></button>
</div>
<?php endforeach; ?>
</section>
css:
.card {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
max-width: 300px;
margin: auto;
height: 300px;
text-align: center;
font-family: arial;
}
.skin {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
max-width: 300px;
margin: auto;
text-align: center;
font-family: arial;
}
.price {
color: grey;
font-size: 22px;
}
.card button {
border: none;
outline: 0;
margin-top: 10px;
height: 30px;
color: black;
background-color: #fff;
border-top: 1px solid rgba(0, 0, 0, 0.2);;
border-bottom: 1px solid rgba(0, 0, 0, 0.2);;
text-align: center;
cursor: pointer;
width: 100%;
font-size: 18px;
}
.card button:hover {
opacity: 0.7;
}
was just that same man vlw
– Ming
@Gabrielcosta good that helped, good luck there!
– hugocsl
opa mano I’ll create a new question about by a counter on top of this image I’m trying to, but I’m getting and I send you the link you could give me a help?
– Ming
@Gabrielcosta I don’t know much about JS, actually almost nothing, but what you need help with the layout I help you yes
– hugocsl
vlw I’m going to do a better search, @hugocsl and about this code I tried to put and it looked exactly like this http://prntscr.com/ky5tm3, you called jquery?
– Ming
No Hoover appears when you click or edge.
– Ming
@Gabrielcosta this CSS that works only in :Hover, that is when the user hovers over the card. If you want to change the class when it clicks with the mouse, then only with jquery or JS... This is exactly what you want, that only when the guy clicks on the card appears the information?
– hugocsl
was right, but like the Hoover when it passes the mouse is not going the Hoover and I used the same code.
– Ming
ta getting static and without Hoover as in this print ; prntscr.com/ky5tm3
– Ming
Cara se aqui funciona eh para funcionar no seu código tb. Vc esta usando algum outro CSS? Tentar colocar esse código em outro html para ver funciona. If it works, eh pq has some CSS on your current page that is interfering with this new CSS. Remove unnecessary css etc... You’re wearing a bootstrap?
– hugocsl
I’ll test, I’m not wearing bootstrap no.
– Ming