UNPKG

hovertile

Version:

A port of Mary Lou's hover tiles to React

56 lines (50 loc) 1.36 kB
figure.sadie figcaption::before { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: -webkit-linear-gradient(top, rgba(72,76,97,0) 0%, rgba(72,76,97,0.8) 75%); background: linear-gradient(to bottom, rgba(72,76,97,0) 0%, rgba(72,76,97,0.8) 75%); content: ''; opacity: 0; -webkit-transform: translate3d(0,50%,0); transform: translate3d(0,50%,0); } figure.sadie .content { position: absolute; top: 50%; left: 0; width: 100%; color: #484c61; -webkit-transition: -webkit-transform 0.35s, color 0.35s; transition: transform 0.35s, color 0.35s; -webkit-transform: translate3d(0,-50%,0); transform: translate3d(0,-50%,0); } figure.sadie figcaption::before, figure.sadie .hoverContent { -webkit-transition: opacity 0.35s, -webkit-transform 0.35s; transition: opacity 0.35s, transform 0.35s; } figure.sadie .hoverContent { position: absolute; bottom: 0; left: 0; padding: 2em; width: 100%; opacity: 0; -webkit-transform: translate3d(0,10px,0); transform: translate3d(0,10px,0); } figure.sadie:hover .content { color: #fff; -webkit-transform: translate3d(0,-50%,0) translate3d(0,-40px,0); transform: translate3d(0,-50%,0) translate3d(0,-40px,0); } figure.sadie:hover figcaption::before , figure.sadie:hover .hoverContent { opacity: 1; -webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0); }