<html>
<head>
<meta charset=utf-8 />
<title>Textures and Patterns</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
article, aside, figure, footer, header, hgroup,
menu, nav, section { display: block; }
body{margin:0; padding:24px; line-height:1.5; background:#ccc;}
h1 {border-top: 1px solid black; margin:23px 0 0; text-align:center; padding:0; height:24px;}
h1 span { position: relative; top: -24px; padding: 0 20px; background:white;}
div {margin:24px 0; padding:12px; background:white;}
p{margin:0 0 12px; background:rgba(255,255,255, 0.6);}
#ex2 h1{border-color:white; color:white}
#ex2, #ex2 span{background:url(http://c572.ca/images/bigNoise.png);}
#ex3, #ex3 span{background:url(http://c572.ca/images/tileTest.png) center top;}
#ex3 span{background-position:center 6px;}
</style>
</head>
<body>
<div id="ex1">
<h1><span>Solid Colour</span></h1>
<p>This is a solid background for comparision with all the other examples.</p>
</div>
<div id="ex2">
<h1><span>Noise Background</span></h1>
<p>This example use a background of noise. Seams just don't show up in noise, it's purley random, so you can't really tell when one bit-of-random is next to the wrong other-bit-of-random</p>
</div>
<div id="ex3">
<h1><span>Tiling Background</span></h1>
<p>This example uses a tiling background image. By telling the background on both the container and the span to center horizontally, the columns stay lined up no matter the size of the tile. Then it's just a matter of adjusting the vertical offset.</p>
<h1><span>Tiling Background part 2</span></h1>
<p>Because this example uses a consistent basline grid, and the height of the background image is the same as the grid, the effect doesn't break as more headings are added.</p>
<h1><span>Tiling Background part 3</span></h1>
<p>See? It just keeps working. Mostly. The different browseres seem to size the span slightly differently, which can lead to the background on the span being off vertically by a pixel</p>
</div>
</body>
</html>
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |