Find file
Fetching contributors…
Cannot retrieve contributors at this time
95 lines (64 sloc) 2.32 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
echo spritemeStyle();
echo spritemeHeader();
<div id=contents class=contents>
echo spritemeNav("home");
<h2 style="margin-top: 0;">Spriting made easy</h2>
<div style="margin-left: 20px; margin-top: 4px; width: 600px;">
Background images make pages look good, but also make them slower.
Each background image is an extra HTTP request.
There's a fix: combine background images into a <a href="faq.php#def">CSS sprite</a>.
But creating sprites is hard, requiring arcane knowledge and lots of trial and error.
SpriteMe removes the hassles with the click of a button.
Try it on this page:
<input type=button value="Run SpriteMe" onclick="(function(){spritemejs=document.createElement('SCRIPT');spritemejs.type='text/javascript';spritemejs.src='spriteme.js';document.getElementsByTagName('head')[0].appendChild(spritemejs);})();">
<div style="margin-left: 20px; margin-top: 4px; width: 600px;">
Install SpriteMe by dragging this link to your bookmark toolbar or right-click to add it to your favorites:
<div style="margin: 8px 8px 20px 80px;">
<a style="font-size: 1.2em;" href="javascript:(function(){var%20spritemejs=document.createElement('SCRIPT');spritemejs.type='text/javascript';spritemejs.src='<?php echo curPath() ?>spriteme.js';document.getElementsByTagName('head')[0].appendChild(spritemejs);})();">SpriteMe</a>
<img src="images/drag-this-link-107x32.png" width=107 height=32 style="vertical-align: bottom; margin-left: 8px;">
<h2>How to use it</h2>
<div style="margin-left: 20px; margin-top: 4px; width: 600px;">
Try the <a href="demo.php">SpriteMe demo</a> to see how SpriteMe:
<ul style="font-size: 1.2em;">
<li> finds background images
<li> groups images into sprites
<li> generates the sprite
<li> recomputes CSS background-positions
<li> injects the sprite into the current page
<p style="margin-top: 40px;">
echo getSummarySavings();
echo spritemeFooter();
</div> <!-- contents -->