charlestati / amplify
- вторник, 19 сентября 2017 г. в 03:14:47
A tiny script allowing inline image zoom
Amplify allows users to increase the size of images.
Best used in narrow containers, between paragraphs.
It is lightweight: 29 sloc of JS and 23 sloc of SCSS resulting in 1.22kB combined.
js-amplify
CSS class to your images<img class="js-amplify" src="photo.jpg" alt="Photo">
Probably Edge, Internet Explorer 10+ and Opera too.
transform: scale()
or JavaScript for smoother transitions.js-*
in CSS is not idealApache 2.0