You provide it with an image path and the dimensions of the original-resolution image. The LESS CSS mixin is a helper for applying high-resolution background images in your stylesheet. (put it at the bottom of your template, before your closing tag) Place the retina.js file on your server.To use it, download the script and include it at the bottom of your page. The JavaScript helper script automatically replaces images on your page with high-resolution variants (if they exist). The script will check your server to see if an alternative image exists at this How to use JavaScript The script assumes you use Apple's prescribed high-resolution modifier to denote high-resolution image variants on your server.įor example, if you have an image on your page that looks like this: If a high-resolution variant exists, the script will swap in that image in-place. When your users load a page, retina.js checks each image on the page to see if there is a high-resolution version of that image on your server.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |