.item-case {
position: relative;
overflow: hidden;
padding-right: 0;
padding-left: 0;
margin-right: 15px;
margin-left: 15px;
}
.item-case .info {
min-width: 100%;
max-width: 100%;
background-color: #00afb5;
padding-top: 7px;
position: absolute;
bottom: 0;
height: auto;
transition: height 5s linear;
}
.item-case .info h2{
margin-top: 0;
margin-left: 10px;
margin-right: 10px;
}
.item-case .info p {
margin-left: 10px;
margin-right: 10px;
display: none;
visibility: hidden;
transition: visibility 5s linear;
}
.item-case:hover .info p {
display: block;
}
.item-case .info h2,
.item-case .info h2 * {
font-family: 'Open Sans', sans-serif;
font-weight: 700;
font-size: 140%;
text-align: center;
color: #fefefe;
}
.item-case .info p,
.item-case .info p * {
color: #5be8ed;
font-family: 'Open Sans', sans-serif;
font-weight: 400;
text-align: center;
font-size: 90%;
}
.item-case .imagem{
position: relative;
}
.item-case .imagem .efeito-imagem {
min-width: 100%;
max-width: 100%;
min-height: 100%;
max-height: 100%;
position: absolute;
top:0;
}
.item-case:hover .imagem .efeito-imagem {
background-color: rgba(62, 62, 62, 0.6);
transition: background 1000ms linear;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script><!--LatestcompiledandminifiedCSS--><linkrel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script><sectionclass="col-md-4 col-sm-4 col-xs-12 item-case">
<div class="imagem">
<img src="http://devimg.com/550x330/dogs"class="img-responsive center-block" alt="">
<div class="efeito-imagem"></div>
</div><!--imagem-->
<div class="info">
<h2>Unimed Alto São Francisco</h2>
<p>lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras ac dolor dinissim, consequat enin sed, convallis massa. Fusce vel nins nibh</p>
</div><!--info-->
</section><!--col-md-4 col-sm-4 col-xs-12 item-case-->
In div
"info" I'm trying to put a soft effect on expansion when the p
element gains visibility and block.
But I could not get the result, with absolute measures, from heigth:10px
to height:50px
for example.
Is there any way to do this preferably without the use of JavaScript?