Skip to content

Instantly share code, notes, and snippets.

@ThatGuySam
Created November 11, 2016 23:28
Show Gist options
  • Save ThatGuySam/112ca9d026c9fe593debe39bd5630c21 to your computer and use it in GitHub Desktop.
Save ThatGuySam/112ca9d026c9fe593debe39bd5630c21 to your computer and use it in GitHub Desktop.
Click to View class for Visual Composer Images
.ctv .vc_single_image-wrapper {
position: relative;
}
.ctv .vc_single_image-wrapper:before {
content: " ";
color: #ffffff;
text-align: center;
letter-spacing: 0.1em;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,0.4);
opacity: 0;
-webkit-transition: all 200ms ease;
-moz-transition: all 200ms ease;
-o-transition: all 200ms ease;
transition: all 200ms ease;
}
.ctv .vc_single_image-wrapper:after {
content: "CLICK to VIEW";
color: #ffffff;
text-align: center;
letter-spacing: 0.1em;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
transform: translateY(10px);
opacity: 0;
-webkit-transition: all 200ms ease;
-moz-transition: all 200ms ease;
-o-transition: all 200ms ease;
transition: all 200ms ease;
}
.ctv .vc_single_image-wrapper:hover:after {
transform: translateY(0px);
opacity: 1;
}
.ctv .vc_single_image-wrapper:hover:before {
opacity: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment