Skip to content

Instantly share code, notes, and snippets.

@segellabs
Created February 11, 2010 13:52
Show Gist options
  • Save segellabs/301524 to your computer and use it in GitHub Desktop.
Save segellabs/301524 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="description" content="Menggunakan CSS Sprite"/>
<title>Menggunakan CSS Sprite</title>
<style>
/* Main Styling */
.thumb {
background-image:url(thumbs21.php);
height:64px;
width:64px;
}
.t1 { background-position:0 0;}
.t2 { background-position:-64px 0;}
.t3 { background-position:-128px 0;}
.t4 { background-position:-192px 0;}
.t5 { background-position:-256px 0;}
.t6 { background-position:-320px 0;}
.t7 { background-position:-384px 0;}
.t8 { background-position:-448px 0;}
.t9 { background-position:-512px 0;}
.t10 { background-position:-576px 0;}
/* Eye Candy */
#wrapper {
margin:0 auto;
width:600px;
}
.thumb {
border:5px solid black;
float:left;
margin:1em;
}
</style>
</head>
<body>
<div id="wrapper">
<div class="thumb t1"></div>
<div class="thumb t2"></div>
<div class="thumb t3"></div>
<div class="thumb t4"></div>
<div class="thumb t5"></div>
<div class="thumb t6"></div>
<div class="thumb t7"></div>
<div class="thumb t8"></div>
<div class="thumb t9"></div>
<div class="thumb t10"></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment