No-Library (pure JS), HTML, CSS, JavaScript
image center horizontal vertical keep ratio
jQuery 1.8.3, HTML, CSS, JavaScript