UNPKG

hovertile

Version:

A port of Mary Lou's hover tiles to React

48 lines (41 loc) 1.09 kB
figure.ruby { background-color: #17819c; } figure.ruby img { opacity: 0.7; -webkit-transition: opacity 0.35s, -webkit-transform 0.35s; transition: opacity 0.35s, transform 0.35s; -webkit-transform: scale(1.15); transform: scale(1.15); } figure.ruby:hover img { opacity: 0.5; -webkit-transform: scale(1); transform: scale(1); } figure.ruby .content { margin-top: 20%; -webkit-transition: -webkit-transform 0.35s; transition: transform 0.35s; -webkit-transform: translate3d(0,20px,0); transform: translate3d(0,20px,0); } figure.ruby .hoverContent { margin: 1em 0 0; padding: 3em; border: 1px solid #fff; opacity: 0; -webkit-transition: opacity 0.35s, -webkit-transform 0.35s; transition: opacity 0.35s, transform 0.35s; -webkit-transform: translate3d(0,20px,0) scale(1.1); transform: translate3d(0,20px,0) scale(1.1); } figure.ruby:hover .content { -webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } figure.ruby:hover .hoverContent { opacity: 1; -webkit-transform: translate3d(0,0,0) scale(1); transform: translate3d(0,0,0) scale(1); }