Skip to content Skip to sidebar Skip to footer

Text With Transparent Background Infront Of An Image

HTML

Solution 2:

I just Came up with @kougiland Solution, You need to set transparent background height to image height

CSS

  *{
    padding:0;
    margin:0;
}
#articlebottom {
    width: 980px;
    height: 300px;          
}

.products{
    width:980px;
    margin:0px auto;
    padding-left:20px;
} 
#articlebottom.imgWrap {
    width:295px;
    height:200px;
    position:relative;
    float:left;
    margin:10px;
    background:black;
}
#articlebottom.imgWrapimg {
    position:absolute;
    left:5px;
    top:5px;
    width:285px;
    height:190px;
}

#articlebottom.imgDescription {
    position: absolute;
    left:0;
    letter-spacing: 2px;
    background-color: rgba(255, 250, 250, 0.2);
    color: rgba(255, 250, 250, 0.2);
    font-weight:bold;
    font-size:18pt;
    line-height: 50px;
    width:100%;
    height:25%;
    opacity: 0;
    text-align:center;
    text-transform:uppercase;
    transition:opacity 500ms ease-in-out, color 20ms ease-in-out,height 500ms ease-in-out;
}

#articlebottom.imgWrap:hover.imgDescription {
    opacity: 1;
    height:100%;
    color: #1b9bff;
}

Fiddle Demo

Post a Comment for "Text With Transparent Background Infront Of An Image"