Skip to content

Instantly share code, notes, and snippets.

@srobbin
srobbin / 3d-css-book-covers.html
Created May 22, 2012 18:10
3D CSS Book Covers - HTML
<div id="book1" class="book">
<img src="book.jpg" />
</div>
@font-face {
font-family: "Shifticons";
  src: url("../fonts/shifticons.eot"); /* IE9 Compat Modes */
  src: url("../fonts/shifticons.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
       url("../fonts/shifticons.woff") format("woff"), /* Modern Browsers */
       url("../fonts/shifticons.ttf")  format("truetype"), /* Safari, Android, iOS */
       url("../fonts/shifticons.svg#Shifticons") format("svg"); /* Legacy iOS */
}
@srobbin
srobbin / gist:2014302
Created March 11, 2012 00:56
Disabling Backstretch for printing
<style media="print">
#backstretch { display: none; }
</style>
@srobbin
srobbin / gist:2002441
Created March 8, 2012 18:13
Approach Demo: Opacity
<!--
In this demo, there are a series of circular images.
Their opacity changes as you approach each individual one.
-->
<!-- Beginning styles -->
<style>
img.circle {
float: left;
height: 80px;
@srobbin
srobbin / gist:2002330
Created March 8, 2012 17:51
Approach Demo: Grow and color
<!--
Notice that the size and color of the text above changes
as your cursor approaches it.
-->
<!-- Beginning styles -->
<style>
a#demo-link {
font-size: 24px;
color: #FFFFCC;
@srobbin
srobbin / gist:1980553
Created March 5, 2012 19:37
PageSlide Demo: Programmatically
<a href="javascript:$.pageslide({ direction: 'left', href:'_secondary.html' })">Link text</a>
@srobbin
srobbin / gist:1980526
Created March 5, 2012 19:32
PageSlide Demo: Modal
<a href="#modal" class="second">Link text</a>
<div id="modal" style="display:none">
<h2>Modal</h2>
<a href="javascript:$.pageslide.close()">Close</a>
</div>
<script>
$(".second").pageslide({ direction: "left", modal: true });
</script>
@srobbin
srobbin / gist:1980518
Created March 5, 2012 19:31
PageSlide Demo: Secondary Page
<a href="_secondary.html" class="first">Link text</a>
<script>
$("a.first").pageslide();
</script>
@srobbin
srobbin / gist:1979034
Created March 5, 2012 16:06
Intelligist Demo: Live JS
/*
We can even execute JavaScript.
For example, here is a simple jQuery plugin that shuffles the "Demo" heading text above.
http://tutorialzine.com/2011/09/shuffle-letters-effect-jquery/
*/
$("#demo-header").shuffleLetters();
@srobbin
srobbin / gist:1978737
Last active March 25, 2018 13:01
Backstretch Demo: Button Click
/*
* You can easily attach Backstretch to jQuery events, like click
*
* Click the buttons above to see the background image change
*/
$("#outside").click(function(e) {
e.preventDefault();
$.backstretch('images/outside.jpg');
});