console.log( 'Code is Poetry' );
https://www.youtube.com/watch?v=55kbL7iyNCw
.container {
background-color: #E2DFFE;
transition: all 0.3s ease-in-out;
}
.container:hover {
background-color: #FFFFFF;
}
.reveal {
transform: scale(0);
opacity: 0;
transition: all 0.3s ease-in-out;
width: 0;
}
.container:hover .reveal {
opacity: 1;
transform: scale(1);
width: 14%;
}
.visible {
transition: all 0.3s ease-in-out;
width: 100% !important;
}
.container:hover .visible {
width: 86% !important;
}
/* Adjust the horizontal reveal effect on mobile */
@media only screen and (max-width: 767px) {
.container:hover .reveal {
width: 40% !important;
}
.container:hover .visible {
width: 60% !important;
}
}
/* Disable the horizontal reveal effect on mobile */
@media only screen and (max-width: 767px) {
.container:hover {
background-color: #E2DFFE;
}
.container:hover .reveal {
opacity: 0;
width: 0;
}
}
/* Adjust the horizontal reveal effect for tablets */
@media only screen and (min-width: 767px) and (max-width: 1024px) {
.container:hover .reveal {
width: 25%;
}
.container:hover .visible {
width: 75% !important;
}
}
/* The vertical reveal effect 👇 */
.revealvertical {
transition: all 0.4s ease-in-out;
max-height: 0 !important;
}
.container:hover .revealvertical {
max-height: 230px !important;
}
@media only screen and (max-width: 767px) {
.container:hover {
transition: none !important;
}
}
/* Adjust the vertical reveal effect on mobile */
@media only screen and (max-width: 767px) {
.container:hover .revealvertical {
max-height: 330px !important;
}
}
/* Disable the vertical reveal effect on mobile by hiding the class getting revealed */
@media only screen and (max-width: 767px) {
.container {
background-color: #E2DFFE;
}
.container:hover .revealvertical {
max-height: 0 !important;
}
}
/* Disable the vertical reveal effect on mobile by making it always revealed */
@media only screen and (max-width: 767px) {
.container:hover {
background-color: #E2DFFE;
}
.revealvertical {
max-height: 230px !important;
}
}
/* Adjust the vertical reveal effect for tablets */
@media only screen and (min-width: 767px) and (max-width: 1024px) {
.container:hover {
background-color: #E2DFFE;
}
.container:hover .revealvertical {
max-height: 150px !important;
}
}