I'm developing a web application and would like that when I did not hover over the image, I would only see the image on the screen, without the description of the product, the price and the border around it.
Image without hover effect.
AndwhenIhoverovertheimageIwouldliketheimagetobeborderedbytheborderandtheproductdescription,priceandtheLearnmorebuttonappear.
Imagewithhover
HTML
<divclass="col-sm-3 col-md-3">
<div class="linha">
<img src="imagens/camisa_1.JPG" alt="camisa1" class="imagem_teste">
<a href="#" onMouseOver="mostrarElemento('saiba_mais1', 'inline');"
onMouseOut="mostrarElemento('saiba_mais1', 'none');" >
<p class="descricao_produto">Calça Jeans Armani</p>
<h4 class="preco"> A partir de R$134,99</h4>
<button class="saiba_mais" id="saiba_mais1">SAIBA MAIS</button>
</a>
</div>
</div>
CSS
.linha{
border: 1px solid #E0E0DA;
height: 390px;
}
.descricao_produto{
color:black;
font-weight: 700;
}
.preco{
color:red;
}
JS
<script language="JavaScript">
function mostrarElemento(id, visibilidade) {
document.getElementById(id).style.display = visibilidade;
}
</script>