<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Codrops &#187; CSS3</title>
	<atom:link href="http://tympanus.net/codrops/tag/css3/feed/" rel="self" type="application/rss+xml" />
	<link>http://tympanus.net/codrops</link>
	<description>Useful resources and inspiration for creative minds</description>
	<lastBuildDate>Mon, 06 Feb 2012 07:30:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>3D Gallery with CSS3 and jQuery</title>
		<link>http://tympanus.net/codrops/2012/02/06/3d-gallery-with-css3-and-jquery/</link>
		<comments>http://tympanus.net/codrops/2012/02/06/3d-gallery-with-css3-and-jquery/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 07:30:10 +0000</pubDate>
		<dc:creator>Pedro Botelho</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=7643</guid>
		<description><![CDATA[Today, we want to share an experimental 3D gallery with you that uses CSS 3D transforms.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Development/3DGallery/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/3DGallery.jpg" alt="3DGallery" title="" width="580" height="315" class="alignnone size-full wp-image-7646" /></a></p>
<p><a class="demo" href="http://tympanus.net/Development/3DGallery/">View demo</a> <a class="download" href="http://tympanus.net/Development/3DGallery/3DGallery.zip">Download source</a></p>
<p>With 3D transforms, we can make simple elements more interesting by setting them into three dimensional space. Together with CSS transitions, these elements can be moved in 3D space and create a realistic effect. Today, we want to share an experimental 3D gallery with you that uses CSS 3D transforms.</p>
<p>The main idea is to create a circular gallery where we have an image in the center and two on the sides. Since we are using perspective, the two lateral images will appear three dimensional when we rotate them.</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<p><strong>Please note that this will only work in browsers that support CSS 3D transforms.</strong></p>
<h3>How it works</h3>
<p>The following HTML structure is used for the gallery:</p>
<pre class="brush:xml">
&lt;section id="dg-container" class="dg-container"&gt;
	&lt;div class="dg-wrapper"&gt;
		&lt;a href="#"&gt;
			&lt;img src="images/1.jpg" alt="image01"&gt;
			&lt;div&gt;http://www.colazionedamichy.it/&lt;/div&gt;
		&lt;/a&gt;
		&lt;a href="#"&gt;
			&lt;!-- ... --&gt;
		&lt;/a&gt;
		&lt;!-- ... --&gt;
	&lt;/div&gt;
	&lt;nav&gt;
		&lt;span class="dg-prev"&gt;&lt;&lt;/span&gt;
		&lt;span class="dg-next"&gt;&gt;&lt;/span&gt;
	&lt;/nav&gt;
&lt;/section&gt;
</pre>
<p>And this is how the gallery is initialized:</p>
<pre class="brush:js">
$('#dg-container').gallery();
</pre>
<h3>Options</h3>
<p>The following options are available:</p>
<pre class="brush:js">
current		: 0,
// index of current item

autoplay	: false,
// slideshow on / off

interval	: 2000
// time between transitions
</pre>
<p>I hope you enjoy it!</p>
<p><a class="demo" href="http://tympanus.net/Development/3DGallery/">View demo</a> <a class="download" href="http://tympanus.net/Development/3DGallery/3DGallery.zip">Download source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2012/02/06/3d-gallery-with-css3-and-jquery/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>How to create animated tooltips with CSS3</title>
		<link>http://tympanus.net/codrops/2012/02/01/how-to-create-animated-tooltips-with-css3/</link>
		<comments>http://tympanus.net/codrops/2012/02/01/how-to-create-animated-tooltips-with-css3/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 08:40:04 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[pseudo-elements]]></category>
		<category><![CDATA[tooltips]]></category>
		<category><![CDATA[transition]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=7624</guid>
		<description><![CDATA[How to create some simple, animated tooltips using CSS transitions and the pseudo-classes :before and :after]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/TipsTricks/CSS3Tooltips/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/CSS3Tooltips.jpg" alt="CSS3Tooltips" title="" width="580" height="315" class="alignnone size-full wp-image-7636" /></a></p>
<p><a class="demo" href="http://tympanus.net/TipsTricks/CSS3Tooltips/" >View demo</a> <a class="download" href="http://tympanus.net/TipsTricks/CSS3Tooltips/CSS3Tooltips.zip">Download source</a></p>
<p>In today&#8217;s tip we&#8217;ll show you how to create some simple, animated tooltips using CSS transitions and the pseudo-classes :before and :after.</p>
<p>The idea is to have a list with links or in our case, social icons, that reveal a little tooltip on hover. </p>
<p>The unordered list will look like this:</p>
<pre class="brush:xml">
&lt;ul class="tt-wrapper"&gt;
	&lt;li&gt;&lt;a class="tt-gplus" href="#"&gt;&lt;span&gt;Google Plus&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a class="tt-twitter" href="#"&gt;&lt;span&gt;Twitter&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a class="tt-dribbble" href="#"&gt;&lt;span&gt;Dribbble&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a class="tt-facebook" href="#"&gt;&lt;span&gt;Facebook&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a class="tt-linkedin" href="#"&gt;&lt;span&gt;LinkedIn&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a class="tt-forrst" href="#"&gt;&lt;span&gt;Forrst&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>The list elements will be floating left and the anchors will have the following style:</p>
<pre class="brush:css">
.tt-wrapper li a{
	display: block;
	width: 68px;
	height: 70px;
	margin: 0 2px;
	outline: none;
	background: transparent url(../images/icons.png) no-repeat top left;
	position: relative;
}
</pre>
<p>Each anchor will have a different background position for the background image:</p>
<pre class="brush:css">
.tt-wrapper li .tt-gplus{
    background-position: 0px 0px;
}
.tt-wrapper li .tt-twitter{
    background-position: -68px 0px;
}
.tt-wrapper li .tt-dribbble{
    background-position: -136px 0px;
}
.tt-wrapper li .tt-facebook{
    background-position: -204px 0px;
}
.tt-wrapper li .tt-linkedin{
    background-position: -272px 0px;
}
.tt-wrapper li .tt-forrst{
    background-position: -340px 0px;
}
</pre>
<p>The span will work as our tooltip and we will &#8220;hide&#8221; it by setting its initial opacity to 0. The effect I want to share with you is the tooltip fading in and appearing from the top, so we will give it a bottom of 100px, placing it above the anchor:</p>
<pre class="brush:css">
.tt-wrapper li a span{
	width: 100px;
	height: auto;
	line-height: 20px;
	padding: 10px;
	left: 50%;
	margin-left: -64px;
	font-family: 'Alegreya SC', Georgia, serif;
	font-weight: 400;
	font-style: italic;
	font-size: 14px;
	color: #719DAB;
	text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
	text-align: center;
	border: 4px solid #fff;
	background: rgba(255,255,255,0.3);
	text-indent: 0px;
	border-radius: 5px;
	position: absolute;
    pointer-events: none;
	bottom: 100px;
	opacity: 0;
	box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
	transition: all 0.3s ease-in-out;
}
</pre>
<p>Since we will make the tooltip appear on hover over the anchor (and the span counts as part of the anchor) the tooltip will also appear when hovering over the area <em>above</em> the anchor (the span is still there, it&#8217;s just the 0 opacity that makes it invisible).</p>
<p>For the little pointer, we will style the pseudo-elements :before and :after. We will style them the same way and create a triangle by using transparent left and right borders. The :before pseudo-element will serve as a shadow for the :after pseudo-element, so we&#8217;ll give it a black rgba value with a low opacity:</p>
<pre class="brush:css">
.tt-wrapper li a span:before,
.tt-wrapper li a span:after{
	content: '';
	position: absolute;
	bottom: -15px;
	left: 50%;
	margin-left: -9px;
	width: 0;
	height: 0;
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-top: 10px solid rgba(0,0,0,0.1);
}
</pre>
<p>The :after pseudo-element will be placed a pixel away and we&#8217;ll make it white, just like the border of the tooltip itself:</p>
<pre class="brush:css">
.tt-wrapper li a span:after{
	bottom: -14px;
	margin-left: -10px;
	border-top: 10px solid #fff;
}
</pre>
<p>So, on hover, we will make the span move from the top and fade in:</p>
<pre class="brush:css">
.tt-wrapper li a:hover span{
	opacity: 0.9;
	bottom: 70px;
}
</pre>
<p>And voilà! Very simple animated tooltips! In the <a href="http://tympanus.net/TipsTricks/CSS3Tooltips/index2.html">second demo</a>, you can see an alternative style for the tooltip (a funny circle) which scales up from the anchor and in the <a href="http://tympanus.net/TipsTricks/CSS3Tooltips/index3.html">third demo</a> the tooltips are rotated. The <a href="http://tympanus.net/TipsTricks/CSS3Tooltips/index3.html">forth demo</a> shows another neat effect.</p>
<p>The beautiful social icons in the demo are by <a href="http://www.growcase.com/2011/11/friday-freebie-the-social-gunman-icons-concept/">Emir Ayouni (growcase.com)</a>.</p>
<p>I hope you enjoyed this little effect and find it useful!</p>
<p><em>Needless to say, this will only work in browsers that support pseudo-elements and CSS transitions.</em></p>
<p><a class="demo" href="http://tympanus.net/TipsTricks/CSS3Tooltips/" >View demo</a> <a class="download" href="http://tympanus.net/TipsTricks/CSS3Tooltips/CSS3Tooltips.zip">Download source</a></p>
<p><em>Image Credits:</em><br />
<em>Abstract Vector Image By <a href="http://www.flickr.com/photos/vectorportal/3260705773/sizes/o/in/photostream/">Vectorportal.com</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2012/02/01/how-to-create-animated-tooltips-with-css3/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Page Transitions with CSS3</title>
		<link>http://tympanus.net/codrops/2012/01/30/page-transitions-with-css3/</link>
		<comments>http://tympanus.net/codrops/2012/01/30/page-transitions-with-css3/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 08:47:47 +0000</pubDate>
		<dc:creator>Sergio Camalich</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[general sibling selector]]></category>
		<category><![CDATA[pseudo-element]]></category>
		<category><![CDATA[transition]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=7560</guid>
		<description><![CDATA[In the last few years, we've seen a lot of single page websites lying around the internet, most of them using JavaScript for some transitions effect. Well, now I'm gonna teach you how you can have your own, but instead I'll be using CSS Transitions and the :target property to do all the magic.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Tutorials/CSS3PageTransitions/index.html#home"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/CSS3PageTransitions.jpg" alt="CSS3PageTransitions" title="" width="580" height="315" class="alignnone size-full wp-image-7610" /></a></p>
<p><a class="demo" href="http://tympanus.net/Tutorials/CSS3PageTransitions/index.html#home">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/CSS3PageTransitions/CSS3PageTransitions.zip">Download source</a></p>
<p>In the last few years, we&#8217;ve seen a lot of single page websites lying around the internet, most of them using JavaScript for some transitions effect. Well, now I&#8217;m gonna teach you how you can have your own, but instead I&#8217;ll be using CSS Transitions and the :target property to do all the magic.</p>
<p>The Dribbble shots used in the demos are by Matt Kaufenberg. Check out his <a href="http://dribbble.com/stuntman">Dribbble profile</a> or visit his <a href="http://www.illustrationaday.com/">An Illustration-a-Day Blog</a>.</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>Markup</h3>
<p>The HTML will contain five main divisions: a header and the four content sections. Each of the content sections is going to have an ID and the class <strong>panel</strong>. Moreover, we will add another division inside which will have the class <strong>content</strong>. The first content section which is #home will only have the <strong>content</strong> class and will not require an extra division:</p>
<pre class="brush:xml">
&lt;!-- Home --&gt;
&lt;div id="home" class="content"&gt;
	&lt;h2&gt;Home&lt;/h2&gt;
	&lt;p&gt;Some content&lt;/p&gt;
	&lt;!-- ... --&gt;
&lt;/div&gt;
&lt;!-- /Home --&gt;

&lt;!-- Portfolio --&gt;
&lt;div id="portfolio" class="panel"&gt;
	&lt;div class="content"&gt;
		&lt;h2&gt;Portfolio&lt;/h2&gt;
		&lt;p&gt;Some content&lt;/p&gt;
		&lt;!-- ... --&gt;
	&lt;/div&gt;
&lt;/div&gt;
&lt;!-- /Portfolio --&gt;

&lt;!-- About --&gt;
&lt;div id="about" class="panel"&gt;
	&lt;div class="content"&gt;
		&lt;h2&gt;About&lt;/h2&gt;
		&lt;p&gt;Some content&lt;/p&gt;
		&lt;!-- ... --&gt;
	&lt;/div&gt;
&lt;/div&gt;
&lt;!-- /About --&gt;

&lt;!-- Contact --&gt;
&lt;div id="contact" class="panel"&gt;
	&lt;div class="content"&gt;
		&lt;h2&gt;Contact&lt;/h2&gt;
		&lt;p&gt;Some content&lt;/p&gt;
		&lt;!-- ... --&gt;
	&lt;/div&gt;
&lt;/div&gt;
&lt;!-- /Contact --&gt;
</pre>
<p>In the header we will have the main heading and the navigation:</p>
<pre class="brush:xml">
&lt;!-- Header with Navigation --&gt;
&lt;div id="header"&gt;
	&lt;h1&gt;Page Transitions with CSS3&lt;/h1&gt;
	&lt;ul id="navigation"&gt;
		&lt;li&gt;&lt;a id="link-home" href="#home"&gt;Home&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a id="link-portfolio" href="#portfolio"&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a id="link-about" href="#about"&gt;About Me&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a id="link-contact" href="#contact"&gt;Contact&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
&lt;/div&gt;
</pre>
<p>The reason for having such an &#8220;unordered&#8221; structure by adding the header to the end, is that we make the navigation &#8220;reachable&#8221; using the general sibling selector (~), so that we can color the respective items differently.</p>
<p>Now, the main idea is to use the pseudo-class :target in order to add a transition to the current section. In this example, we will be sliding up and down our sections.</p>
<h3>CSS</h3>
<p>First we will give style to our header and the navigation. We want to keep these on the same spot at all the time, even though everything else will be moving.</p>
<pre class="brush:css">
#header{
	position: absolute;
	z-index: 2000;
	width: 235px;
	top: 50px;
}
#header h1{
	font-size: 30px;
	font-weight: 400;
	text-transform: uppercase;
	color: rgba(255,255,255,0.9);
	text-shadow: 0px 1px 1px rgba(0,0,0,0.3);
	padding: 20px;
	background: #000;
}
#navigation {
	margin-top: 20px;
	width: 235px;
	display:block;
	list-style:none;
	z-index:3;
}
#navigation a{
	color: #444;
	display: block;
	background: #fff;
	background: rgba(255,255,255,0.9);
	line-height: 50px;
	padding: 0px 20px;
	text-transform: uppercase;
	margin-bottom: 6px;
	box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
	font-size: 14px;
}
#navigation a:hover {
	background: #ddd;
}
</pre>
<p>All the sections except #home have the <strong>panel</strong> class. Here we will be using the transition whenever an element with this class gets &#8220;targeted&#8221;. The trick is to use a negative margin in the &#8220;normal&#8221; class and no margin at all in the :target pseudo-class. Adding a transitions will make the panel slide from the top whenever one is &#8220;selected&#8221;:</p>
<pre class="brush:css">
.panel{
	min-width: 100%;
	height: 98%;
	overflow-y: auto;
	overflow-x: hidden;
	margin-top: -150%;
	position: absolute;
	background: #000;
	box-shadow: 0px 4px 7px rgba(0,0,0,0.6);
	z-index: 2;
	-webkit-transition: all .8s ease-in-out;
	-moz-transition: all .8s ease-in-out;
	-o-transition: all .8s ease-in-out;
	transition: all .8s ease-in-out;
}
.panel:target{
	margin-top: 0%;
	background-color: #ffcb00;
}
</pre>
<p>Next, let&#8217;s style the <strong>content</strong> class that all our sections have:</p>
<pre class="brush:css">
.content{
	right: 40px;
	left: 280px;
	top: 0px;
	position: absolute;
	padding-bottom: 30px;
}
.content h2{
	font-size: 110px;
	padding: 10px 0px 20px 0px;
	margin-top: 52px;
	color: #fff;
	color: rgba(255,255,255,0.9);
	text-shadow: 0px 1px 1px rgba(0,0,0,0.3);
}
.content p{
	font-size: 18px;
	padding: 10px;
	line-height: 24px;
	color: #fff;
	display: inline-block;
	background: black;
	padding: 10px;
	margin: 3px 0px;
}
</pre>
<p>In order to change the color of the current item in the navigation, we&#8217;ll use the :target pseudo-class with the general sibling selector to &#8220;get to&#8221; the respective navigation item:</p>
<pre class="brush:css">
#home:target ~ #header #navigation #link-home,
#portfolio:target ~ #header #navigation #link-portfolio,
#about:target ~ #header #navigation #link-about,
#contact:target ~ #header #navigation #link-contact{
	background: #000;
	color: #fff;
}
</pre>
<p>And that&#8217;s all you need. Check out the demos and you&#8217;ll see other examples of how you can do this.</p>
<p>Hope you liked this tutorial and maybe you can experiment with your own effects.</p>
<p>¡Hasta la próxima!</p>
<p><a class="demo" href="http://tympanus.net/Tutorials/CSS3PageTransitions/index.html#home">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/CSS3PageTransitions/CSS3PageTransitions.zip">Download source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2012/01/30/page-transitions-with-css3/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>Collective #2</title>
		<link>http://tympanus.net/codrops/collective/collective-2/</link>
		<comments>http://tympanus.net/codrops/collective/collective-2/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 18:47:36 +0000</pubDate>
		<dc:creator>Pedro Botelho</dc:creator>
				<category><![CDATA[contact form]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?post_type=collective&#038;p=7434</guid>
		<description><![CDATA[HTML5 Please * Scrollorama * Font.js * Inspiring UI Elements * CSS3/HTML5 Contact Form * deCSS3 * PSD Freebie]]></description>
			<content:encoded><![CDATA[<div class="ct-coll-item">
<article>
<h2>HTML5 Please &#8211; Use the new and shiny responsibly</h2>
<p>		<a class="ct-coll-thumb" href="http://html5please.us/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Collective2_218.jpg" alt="Collective2_218" title="" width="300" height="82" class="alignnone size-full wp-image-7554" /></a></p>
<p>The same brilliant minds that gave us HTML5 Boilerplate, Modernizr &#038; CSS3 Please, now give us HTML5 Please: a very useful resource that summerizes the support and possibilities for all the new properties.</p>
<p>		<a class="ct-coll-link" href="http://html5please.us/">Read it</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Scrollorama</h2>
<p>		<a class="ct-coll-thumb" href="http://johnpolacek.github.com/scrollorama/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Collective2_213.jpg" alt="Collective2_213" title="" width="200" height="173" class="alignnone size-full wp-image-7549" /></a></p>
<p>Scrollorama is an awesome jQuery plugin by John Polacek for doing cool and experimental scrolly stuff. Just scroll the page and you&#8217;ll discover some nice effects.</p>
<p>		<a class="ct-coll-link" href="http://johnpolacek.github.com/scrollorama/">Check it out</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Font.js &#8211; A Powerful Font Toolkit for JavaScript</h2>
<p>		<a class="ct-coll-thumb" href="http://pomax.nihongoresources.com/pages/Font.js/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Collective2_214.jpg" alt="Collective2_214" title="" width="300" height="116" class="alignnone size-full wp-image-7550" /></a></p>
<p>Mike &#8220;Pomax&#8221; Kamermans gives us this useful library that adds a font object to the collection of predefined objects available to you when doing JS coding for the web.</p>
<p>		<a class="ct-coll-link" href="http://pomax.nihongoresources.com/pages/Font.js/">Get it</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Kendo UI &#8211; The Art of Web Development</h2>
<p>		<a class="ct-coll-thumb" href="http://www.kendoui.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Collective2_215.jpg" alt="Collective2_215" title="" width="230" height="91" class="alignnone size-full wp-image-7551" /></a></p>
<p>Kendo UI combines everything needed for modern JavaScript development, including a powerful DataSource, universal Drag-and-Drop, Templates, Themes, and UI Widgets.</p>
<p>		<a class="ct-coll-link" href="http://www.kendoui.com/">Check it out</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>CSS3/HTML5 Contact Form without Images</h2>
<p>		<a class="ct-coll-thumb" href="http://www.onextrapixel.com/2012/01/23/full-css3-html5-contact-form-with-no-images/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Collective2_216.jpg" alt="Collective2_216" title="" width="309" height="144" class="alignnone size-full wp-image-7552" /></a></p>
<p>Stéphanie Walter shows how to create a super-slick HTML5/CSS3 contact form from scratch.</p>
<p>		<a class="ct-coll-link" href="http://www.onextrapixel.com/2012/01/23/full-css3-html5-contact-form-with-no-images/">Read it</a><br />
	</article>
</div>
<div class="ct-coll-item ct-coll-item-multi ct-coll-item-dribbble">
<nav>
		<a href="#" class="ct-coll-nav-prev">Prev</a><br />
		<a href="#" class="ct-coll-nav-next">Next</a><br />
	</nav>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cQsO"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/18.jpg" alt="1" title="" width="330" height="248" class="alignnone size-full wp-image-7543" /></a></p>
<p>Glyph Menu by <a href="http://dribbble.com/lewisbraid">Lewis Braid</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cOUI"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/21.jpg" alt="2" title="" width="330" height="248" class="alignnone size-full wp-image-7544" /></a></p>
<p>just.play by <a href="http://dribbble.com/dirkjanhaarsma">Dirk Jan Haarsma</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cPLG"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/31.jpg" alt="3" title="" width="330" height="248" class="alignnone size-full wp-image-7545" /></a></p>
<p>93% love it! by <a href="http://dribbble.com/mhrescak">Matej Hrescak</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cRVc"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/41.jpg" alt="4" title="" width="330" height="248" class="alignnone size-full wp-image-7546" /></a></p>
<p>Levels by <a href="http://dribbble.com/falcadia">Chris Kelley</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cRtR"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/51.jpg" alt="5" title="" width="330" height="248" class="alignnone size-full wp-image-7547" /></a></p>
<p>Dashboard by <a href="http://dribbble.com/MengTo">Meng To</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cRiI"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/61.jpg" alt="6" title="" width="330" height="248" class="alignnone size-full wp-image-7531" /></a></p>
<p>Header Navigation by <a href="http://dribbble.com/Antlam">Anthony Lam</a></p>
</article>
<article>
<h2>Inspiring UI Shots from Dribbble</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cRhx"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/71.jpg" alt="7" title="" width="330" height="248" class="alignnone size-full wp-image-7532" /></a></p>
<p>Derailed Ui Set &#8211; Free PSD by <a href="http://dribbble.com/Norm">Norm</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cRgZ"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/81.jpg" alt="8" title="" width="330" height="248" class="alignnone size-full wp-image-7533" /></a></p>
<p>On off by <a href="http://dribbble.com/hikim">Hyuk-in Kim</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cRdT"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/91.jpg" alt="9" title="" width="330" height="248" class="alignnone size-full wp-image-7534" /></a></p>
<p>Stats by <a href="http://dribbble.com/ryanvsclark">Ryan Clark</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cRcD"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/101.jpg" alt="10" title="" width="330" height="248" class="alignnone size-full wp-image-7535" /></a></p>
<p>Deck Mobile Interface by <a href="http://dribbble.com/thiyagus15">thiyagu</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cRcb"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/11.jpg" alt="11" title="" width="330" height="248" class="alignnone size-full wp-image-7536" /></a></p>
<p>Drag by <a href="http://dribbble.com/SmartBink">Arnoud Paauwe</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cQZN"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/12.jpg" alt="12" title="" width="330" height="248" class="alignnone size-full wp-image-7537" /></a></p>
<p>Breakpoints by <a href="http://dribbble.com/51bits">Chris Sealey</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cQWV"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/13.jpg" alt="13" title="" width="330" height="248" class="alignnone size-full wp-image-7538" /></a></p>
<p>Vertical Nav by <a href="http://dribbble.com/jermshaw">Jeremiah Shaw</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cQVL"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/14.jpg" alt="14" title="" width="330" height="248" class="alignnone size-full wp-image-7539" /></a></p>
<p>Dark UI kit &#8211; Free PSD resource by <a href="http://dribbble.com/cleanet">Lukas Troup</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cQzO"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/15.jpg" alt="15" title="" width="330" height="248" class="alignnone size-full wp-image-7540" /></a></p>
<p>Calendar by <a href="http://dribbble.com/JJYing">JJ Ying</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cQuN"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/16.jpg" alt="16" title="" width="330" height="248" class="alignnone size-full wp-image-7541" /></a></p>
<p>Content Migrator Interface by <a href="http://dribbble.com/alastair-macgregor">Alastair MacGregor</a></p>
</article>
<article>
<h2>Inspiring UI Element Shots</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cQoy"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/17.jpg" alt="17" title="" width="330" height="248" class="alignnone size-full wp-image-7542" /></a></p>
<p>Simple Download Concept by <a href="http://dribbble.com/JamesCipriano">James Cipriano</a></p>
</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Pick the Right Typefaces for Your Project</h2>
<p>		<a class="ct-coll-thumb" href="http://designshack.net/articles/typography/pick-the-right-typefaces-for-your-project/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Collective2_217.jpg" alt="Collective2_217" title="" width="290" height="192" class="alignnone size-full wp-image-7553" /></a></p>
<p>Carrie Cousins explains how to make the right font choices and font combinations.</p>
<p>		<a class="ct-coll-link" href="http://designshack.net/articles/typography/pick-the-right-typefaces-for-your-project/">Read it</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Design Curate</h2>
<p>		<a class="ct-coll-thumb" href="http://designcurate.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Collective2_212.jpg" alt="Collective2_212" title="" width="300" height="71" class="alignnone size-full wp-image-7548" /></a></p>
<p>Design Curate is a new platform for free and commercial resources for designers.</p>
<p>		<a class="ct-coll-link" href="http://designcurate.com/">Check it out</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Numberfy</h2>
<p>		<a class="ct-coll-thumb" href="http://www.mitya.co.uk/blog/2012/Jan/Numberfy-add-line-numbers-to-your-textareas-198"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Collective2_219.jpg" alt="Collective2_219" title="" width="200" height="99" class="alignnone size-full wp-image-7555" /></a></p>
<p>Andrew Croxall created this jQuery plugin that lets you add line numbers to textareas.</p>
<p>		<a class="ct-coll-link" href="http://www.mitya.co.uk/blog/2012/Jan/Numberfy-add-line-numbers-to-your-textareas-198">Get it</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Nailing Browser Support in CSS3 and HTML5: Invaluable Resources to Use Today</h2>
<p>		<a class="ct-coll-thumb" href="http://designshack.net/articles/css/nailing-browser-support-in-css3-and-html5-invaluable-resources-to-use-today/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Collective2_220.jpg" alt="Collective2_220" title="" width="100" height="55" class="alignnone size-full wp-image-7556" /></a></p>
<p>In this article Joshua Johnson collects some great resources that help developing cross-browser compatible websites.</p>
<p>		<a class="ct-coll-link" href="http://designshack.net/articles/css/nailing-browser-support-in-css3-and-html5-invaluable-resources-to-use-today/">Read it</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Little Notepad Design (PSD)</h2>
<p>		<a class="ct-coll-thumb" href="http://www.premiumpixels.com/freebies/little-notepad-design-psd/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Collective2_221.jpg" alt="Collective2_221" title="" width="280" height="147" class="alignnone size-full wp-image-7557" /></a></p>
<p>Orman Clark shares another pixel-perfect PSD with the community: a beautiful little notepad design.</p>
<p>		<a class="ct-coll-link" href="http://www.premiumpixels.com/freebies/little-notepad-design-psd/">Get it</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>deCSS3</h2>
<p>		<a class="ct-coll-thumb" href="http://davatron5000.github.com/deCSS3/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Collective2_222.jpg" alt="Collective2_222" title="" width="200" height="77" class="alignnone size-full wp-image-7558" /></a></p>
<p>deCSS3 is a bookmarklet for testing if your site degrades gracefully. Get the bookmarklet and see what your site will look like in older browsers that don&#8217;t support CSS3</p>
<p>		<a class="ct-coll-link" href="http://davatron5000.github.com/deCSS3/">Get it</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>The separation of structure, presentation and behavior is dead</h2>
<p>		<a class="ct-coll-thumb" href="http://thinkvitamin.com/design/the-separation-of-structure-presentation-and-behavior-is-dead/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Collective2_224.jpg" alt="Collective2_224" title="" width="140" height="139" class="alignnone size-full wp-image-7559" /></a></p>
<p>Kevin Dees explains how the separation of structure, presentation and behavior is basically dead in practice and how Divergence is the new rasing pattern.</p>
<p>		<a class="ct-coll-link" href="http://thinkvitamin.com/design/the-separation-of-structure-presentation-and-behavior-is-dead/">Read it</a><br />
	</article>
</div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/collective/collective-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arctext.js &#8211; Curving Text with CSS3 and jQuery</title>
		<link>http://tympanus.net/codrops/2012/01/24/arctext-js-curving-text-with-css3-and-jquery/</link>
		<comments>http://tympanus.net/codrops/2012/01/24/arctext-js-curving-text-with-css3-and-jquery/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 15:30:03 +0000</pubDate>
		<dc:creator>Pedro Botelho</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[curve]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[transform]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=7424</guid>
		<description><![CDATA[While CSS3 allows us to rotate letters, it is quite complicated to arrange each letter along a curved path. Arctext.js is a jQuery plugin that let's you do exactly that. Based on Lettering.js, it calculates the right rotation of each letter and distributes the letters equally across the imaginary arc of the given radius.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Development/Arctext/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Arctext.jpg" alt="Arctext" title="" width="580" height="315" class="alignnone size-full wp-image-7427" /></a></p>
<p><a class="demo" href="http://tympanus.net/Development/Arctext/">View demo</a> <a class="download" href="http://tympanus.net/Development/Arctext/Arctext.zip">Download source</a></p>
<p>While CSS3 allows us to rotate letters, it is quite complicated to arrange each letter along a curved path. Arctext.js is a jQuery plugin that let&#8217;s you do exactly that. Based on Lettering.js, it calculates the right rotation of each letter and distributes the letters equally across the imaginary arc of the given radius.</p>
<h3>How it works</h3>
<p>The main idea behind the Arctext plugin is to rotate letters with CSS3 transforms in order to place them along a curved path. The curve is always a segment of a circle (hence arc) for which the radius can be specified. The space and rotation for each letter will be calculated using that radius and the width of the text. </p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>Options</h3>
<p>The following options are available:</p>
<pre class="brush:js">
radius	: 0,
// the minimum value allowed is
// half of the word length.
// if set to -1, the word will be straight.

dir		: 1,
// 1: curve is down,
// -1: curve is up

rotate	: true,
// if true each letter should be rotated.

fitText	: false
// if you want to try out the
// fitText plugin (http://fittextjs.com/)
// set this to true.
// Don't forget, the wrapper should be fluid.
</pre>
<p><a class="demo" href="http://tympanus.net/Development/Arctext/">View demo</a> <a class="download" href="http://tympanus.net/Development/Arctext/Arctext.zip">Download source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2012/01/24/arctext-js-curving-text-with-css3-and-jquery/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>How to spice up your menu with CSS3</title>
		<link>http://tympanus.net/codrops/2012/01/22/how-to-spice-up-your-menu-with-css3/</link>
		<comments>http://tympanus.net/codrops/2012/01/22/how-to-spice-up-your-menu-with-css3/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 12:51:40 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[hover]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[slide out]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=7369</guid>
		<description><![CDATA[Quick tip on how to spice up your menu with CSS3: add an image to every menu item and slide it out on hover.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/TipsTricks/CSS3MenuHoverEffect/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/CSS3MenuHoverEffect.jpg" alt="CSS3MenuHoverEffect" title="" width="580" height="315" class="alignnone size-full wp-image-7370" /></a></p>
<p><a class="demo" href="http://tympanus.net/TipsTricks/CSS3MenuHoverEffect/" >View demo</a> <a class="download" href="http://tympanus.net/TipsTricks/CSS3MenuHoverEffect/CSS3MenuHoverEffect.zip">Download source</a></p>
<p>In this new category called &#8220;Tips and Tricks&#8221; we will introduce some quick and interesting methods around web development and web design. In today&#8217;s tip we&#8217;ll show you how to spice up your menu by adding a neat hover effect to it. The idea is to slide an image out to the right when hovering over a menu item.</p>
<p>Each menu item (which is a unordered list item in this case) will have an anchor containing two spans and an image:</p>
<pre class="brush:xml">
&lt;ul class="mh-menu"&gt;
	&lt;li&gt;
		&lt;a href="#"&gt;
			&lt;span&gt;Art Director&lt;/span&gt;
			&lt;span&gt;Henry James&lt;/span&gt;
		&lt;/a&gt;
		&lt;img src="images/1.jpg" alt="image01"/&gt;
	&lt;/li&gt;
	&lt;!-- ... --&gt;
&lt;/ul&gt;
</pre>
<p>We&#8217;ll give <strong>.mh-menu li a</strong> display block and <strong>rgba(255,255,255, 0.8)</strong> as background color. When we hover over a list item, we&#8217;ll color the background into rgba(225,239,240, 0.4) which is a light blue:</p>
<pre class="brush:css">
.mh-menu li:hover a{
	background: rgba(225,239,240, 0.4);
}
</pre>
<p>The second span will also change its color on hover, but we want to change each item into a different color. So, we&#8217;ll add a color transition and get each different element with the nth-child selector:</p>
<pre class="brush:css">
.mh-menu li a span:nth-child(2){
	/*...*/
	transition: color 0.2s linear;
}
.mh-menu li:nth-child(1):hover span:nth-child(2){
	color: #ae3637;
}
.mh-menu li:nth-child(2):hover span:nth-child(2){
	color: #c3d243;
}
.mh-menu li:nth-child(3):hover span:nth-child(2){
	color: #d38439;
}
.mh-menu li:nth-child(4):hover span:nth-child(2){
	color: #8e7463;
}
</pre>
<p>The image will slide to the right side, so initially, it will have a left of 0px. We&#8217;ll also add a transition for its opacity; it will animate from 0 (initial value) to 1:</p>
<pre class="brush:css">
.mh-menu li img{
	position: absolute;
	z-index: 1;
	left: 0px;
	top: 0px;
	opacity: 0;
	transition: left 0.4s ease-in-out, opacity 0.6s ease-in-out;
}
.mh-menu li:hover img{
	left: 300px;
	opacity: 1;
}
</pre>
<p>And voilà, there we have our nice slide out effect!<br />
Make sure, that the z-index of the anchor is set to something higher than the image so that it slides under the anchor and not on top of it.</p>
<p>Alternatively, we can make the background color of the anchor become opaque on hover, i.e. completely white (<a href="http://tympanus.net/TipsTricks/CSS3MenuHoverEffect/index2.html">demo 2</a>), or color each child differently (<a href="http://tympanus.net/TipsTricks/CSS3MenuHoverEffect/index3.html">demo 3</a>).</p>
<p>The illustrations in the demo are by <a href="http://www.bartoszkosowski.com/">Bartosz Kosowski</a> (<a href="http://creativecommons.org/licenses/by-nc/3.0/">CC BY-NC 3.0</a>).</p>
<p><a class="demo" href="http://tympanus.net/TipsTricks/CSS3MenuHoverEffect/" >View demo</a> <a class="download" href="http://tympanus.net/TipsTricks/CSS3MenuHoverEffect/CSS3MenuHoverEffect.zip">Download source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2012/01/22/how-to-spice-up-your-menu-with-css3/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Collective #1</title>
		<link>http://tympanus.net/codrops/collective/collective1/</link>
		<comments>http://tympanus.net/codrops/collective/collective1/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 15:49:57 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[icons]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?post_type=collective&#038;p=7341</guid>
		<description><![CDATA[Neo Deco Free Font  * Typography Inspiration * Free Icon Sets * HTML5 &#038; CSS3 Highlights]]></description>
			<content:encoded><![CDATA[<div class="ct-coll-item">
<article>
<h2>Free font: Neo Deco</h2>
<p>		<a class="ct-coll-thumb" href="http://www.behance.net/gallery/Free-Typeface-NeoDecoa/2919157"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/neodeco.jpg" alt="neodeco" title="" width="160" height="111" class="alignnone size-full wp-image-7386" /></a></p>
<p>NEO DECO is an absolutely amazing typeface designed by Jonatan Xavier. It&#8217;s free for commercial use.</p>
<p>		<a class="ct-coll-link" href="http://www.behance.net/gallery/Free-Typeface-NeoDecoa/2919157">Get it</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Mac OS X Lion with CSS3</h2>
<p>		<a class="ct-coll-thumb" href="http://www.alessioatzeni.com/blog/mac-os-x-lion-with-css3/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Maccss3.jpg" alt="Maccss3" title="" width="180" height="157" class="alignnone size-full wp-image-7385" /></a></p>
<p>Alessio Atzeni will blow your mind with his latest experiment: Mac OS X Lion remake. He makes intensive use of CSS3 Animations and :target pseudo-class.</p>
<p>		<a class="ct-coll-link" href="http://www.alessioatzeni.com/blog/mac-os-x-lion-with-css3/">Read more</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>CSS3: The Multi Column Layout</h2>
<p>Johnny Simpson shares his excitement about the CSS3 Multi Column Module and explains how it will make designing websites easier. He introduces the single properties of this crucial module and provides some excellent examples and a demo.</p>
<p>		<a class="ct-coll-link" href="http://www.inserthtml.com/2012/01/css3-multi-column-layout-implementation-change-website-design/">Read it</a><br />
	</article>
</div>
<div class="ct-coll-item ">
<article>
<h2>CSS3 Click Chart</h2>
<p>		<a class="ct-coll-thumb" href="http://css3clickchart.com"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/cssclickchart.jpg" alt="cssclickchart" title="" width="140" height="71" class="alignnone size-full wp-image-7383" /></a></p>
<p>Louis Lazaris from <a href="http://www.impressivewebs.com">impressivewebs.com</a> has redesigned and improved his really helpful CSS3 Click Chart. Click on the CSS property and get useful information about it such as the link to the specification, example code and a live demonstration, and more.</p>
<p>		<a class="ct-coll-link" href="http://css3clickchart.com">Check it out</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Making Love To WebKit</h2>
<p>		<a class="ct-coll-thumb" href="http://acko.net/blog/making-love-to-webkit/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/Acko.jpg" alt="Acko" title="" width="200" height="151" class="alignnone size-full wp-image-7382" /></a></p>
<p>Acko.net by Steven Wittens had a major redesign, but not just any! He pushes CSS 3D to the limit. Scroll and enjoy!</p>
<p>		<a class="ct-coll-link" href="http://acko.net/blog/making-love-to-webkit/">Read it</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Multi-coloured Progress Bars PSD</h2>
<p>		<a class="ct-coll-thumb" href="http://www.premiumpixels.com/freebies/multi-coloured-progress-bars-psd/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/progress.jpg" alt="progressBars" title="" width="170" height="119" class="alignnone size-full wp-image-7380" /></a></p>
<p>Don&#8217;t miss Orman Clark&#8217;s latest PSD creation: some beautiful multi-coloured progress bars. </p>
<p>		<a class="ct-coll-link" href="http://www.premiumpixels.com/freebies/multi-coloured-progress-bars-psd/">Get it</a><br />
	</article>
</div>
<div class="ct-coll-item ct-coll-item-multi ct-coll-item-dribbble">
<nav>
		<a href="#" class="ct-coll-nav-prev">Prev</a><br />
		<a href="#" class="ct-coll-nav-next">Next</a><br />
	</nav>
<article>
<h2>Inspiring Typography Shots from Dribbble</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cQcq"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/2.jpg" alt="2" title="" width="330" height="248" class="alignnone size-full wp-image-7389" /></a></p>
<p>Old Fashioned Type Sketch by <a href="http://dribbble.com/jamesblevins">James Blevins</a></p>
</article>
<article>
<h2>Inspiring Typography Shots from Dribbble</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cQdi"/><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/1.jpg" alt="1" title="" width="330" height="248" class="alignnone size-full wp-image-7388" /></a></p>
<p>Save the Date Type by <a href="http://dribbble.com/brennangilbert">Brennan Gilbert</a></p>
</article>
<article>
<h2>Inspiring Typography Shots from Dribbble</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cPZL"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/3.jpg" alt="3" title="" width="330" height="248" class="alignnone size-full wp-image-7390" /></a></p>
<p>Shelley Font by <a href="http://dribbble.com/djsherman">Dillon James Sherman</a></p>
</article>
<article>
<h2>Inspiring Typography Shots from Dribbble</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cPYG"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/4.jpg" alt="4" title="" width="330" height="248" class="alignnone size-full wp-image-7391" /></a></p>
<p>Møuntain by <a href="http://dribbble.com/debbiemartin">Debbie Martin</a></p>
</article>
<article>
<h2>Inspiring Typography Shots from Dribbble</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cPUm"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/5.jpg" alt="5" title="" width="330" height="248" class="alignnone size-full wp-image-7392" /></a></p>
<p>Joe Fletcher Logo Outtake by <a href="http://dribbble.com/EdyLevin">Edith Levin</a></p>
</article>
<article>
<h2>Inspiring Typography Shots from Dribbble</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cPAU"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/6.jpg" alt="6" title="" width="330" height="248" class="alignnone size-full wp-image-7393" /></a></p>
<p>Notredame by <a href="http://dribbble.com/newhousedesign">Michael Newhouse</a></p>
</article>
<article>
<h2>Inspiring Typography Shots from Dribbble</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cPsp"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/7.jpg" alt="7" title="" width="330" height="248" class="alignnone size-full wp-image-7394" /></a></p>
<p>Design Times by <a href="http://dribbble.com/StudioMuti">Studio Muti</a></p>
</article>
<article>
<h2>Inspiring Typography Shots from Dribbble</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cPei"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/8.jpg" alt="8" title="" width="330" height="248" class="alignnone size-full wp-image-7395" /></a></p>
<p>Mini Portfolio Header by <a href="http://dribbble.com/kami">Dave Yoon</a></p>
</article>
<article>
<h2>Inspiring Typography Shots from Dribbble</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cONc"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/9.jpg" alt="9" title="" width="330" height="248" class="alignnone size-full wp-image-7396" /></a></p>
<p>RLO by <a href="http://dribbble.com/nateluetkehans">Nate Luetkehans</a></p>
</article>
<article>
<h2>Inspiring Typography Shots from Dribbble</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cOKU"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/10.jpg" alt="10" title="" width="330" height="248" class="alignnone size-full wp-image-7397" /></a></p>
<p>Hello by <a href="http://dribbble.com/gregchristman">Greg Christman</a></p>
</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Strabo II: A free icon set</h2>
<p>		<a class="ct-coll-thumb" href="http://drbl.in/cPFE"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/strabo.jpg" alt="strabo" title="" width="200" height="150" class="alignnone size-full wp-image-7381" /></a></p>
<p>Visual Idiot let&#8217;s you download his latests free icon set which comes in handy for any web developer or web designer.</p>
<p>		<a class="ct-coll-link" href="http://drbl.in/cPFE">Get it</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Socialico: Social Media Icons Font</h2>
<p>		<a class="ct-coll-thumb" href="http://fontfabric.com/social-media-icons-pack/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/iconfont.jpg" alt="iconfont" title="" width="226" height="152" class="alignnone size-full wp-image-7384" /></a></p>
<p>Using a font for your icons might not be best practice, but who can resist this delicious icon font? Socialico is a pack of 74 social media icons as a font. It&#8217;s designed by <a href="http://www.behance.net/arsek">Jelio Dimitrov</a>.</p>
<p>		<a class="ct-coll-link" href="http://fontfabric.com/social-media-icons-pack/">Get it</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>YouTube Popup Buttons</h2>
<p>		<a class="ct-coll-thumb" href="http://css-tricks.com/youtube-popup-buttons/"><a href="http://css-tricks.com/youtube-popup-buttons/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/youtubebuttons.jpg" alt="youtubebuttons" title="" width="220" height="113" class="alignnone size-full wp-image-7378" /></a></a></p>
<p>Chris Coyier shares his slick remake of the new You Tube buttons. </p>
<p>		<a class="ct-coll-link" href="http://css-tricks.com/youtube-popup-buttons/">Read it</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>Dino Pairs Game with CSS3 Animation</h2>
<p>		<a class="ct-coll-thumb" href="http://www.my-html-codes.com/game-using-css3-animation"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/dinopairs.jpg" alt="dinopairs" title="" width="200" height="129" class="alignnone size-full wp-image-7398" /></a></p>
<p>Check out this cute game by Matt Walker using CSS3 Animations. He provides a great tutorial and a fun demo. </p>
<p>		<a class="ct-coll-link" href="http://www.my-html-codes.com/game-using-css3-animation">Play it</a><br />
	</article>
</div>
<div class="ct-coll-item">
<article>
<h2>The Edge of HTML5</h2>
<p>		<a class="ct-coll-thumb" href="http://html5-demos.appspot.com/static/html5-therealbleedingedge/template/index.html"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/html5edge.jpg" alt="html5edge" title="" width="120" height="89" class="alignnone size-full wp-image-7387" /></a></p>
<p>Google Chrome engineer Eric Bidelman gives us some insight to hot new stuff in HTML5. The presnetation covers CSS Regions, calc(), filters, New Flexbox and more.</p>
<p>		<a class="ct-coll-link" href="http://html5-demos.appspot.com/static/html5-therealbleedingedge/template/index.html">Check it out</a><br />
	</article>
</div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/collective/collective1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sliding Image Panels with CSS3</title>
		<link>http://tympanus.net/codrops/2012/01/17/sliding-image-panels-with-css3/</link>
		<comments>http://tympanus.net/codrops/2012/01/17/sliding-image-panels-with-css3/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 12:51:47 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[background-image]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[general sibling selector]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[sliding]]></category>
		<category><![CDATA[transition]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=7286</guid>
		<description><![CDATA[Today we'll show you how to create some neat sliding image panels with CSS only. The idea is to use background images for the panels and animate them when clicking on a label. We'll use radio buttons with labels and target the respective panels with the general sibling selector. ]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Tutorials/CSS3SlidingImagePanels/"><br />
<img class="alignnone size-full wp-image-7366" src="http://tympanus.net/codrops/wp-content/uploads/2012/01/SlidingImagePanelsCss3_2.jpg" alt="SlidingImagePanelsCss3_2" width="580" height="315" /><br />
</a></p>
<p><a class="demo" href="http://tympanus.net/Tutorials/CSS3SlidingImagePanels/">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/CSS3SlidingImagePanels/CSS3SlidingImagePanels.zip">Download source</a></p>
<p>Today we&#8217;ll show you how to create some neat sliding image panels with CSS only. The idea is to use background images for the panels and animate them when clicking on a label. We&#8217;ll use radio buttons with labels and target the respective panels with the general sibling selector.</p>
<p>The beautiful images are by <a href="http://www.behance.net/qstra">Joanna Kustra</a> and they are licensed under the <a href="http://creativecommons.org/licenses/by-nc/3.0/">Attribution-NonCommercial 3.0 Unported Creative Commons License</a>.</p>
<p>You might as well be interested in <a href="http://tympanus.net/codrops/2012/01/09/filter-functionality-with-css3/">Filter Functionality with CSS3 </a> where we have used a similar technique for filtering elements based on their type.</p>
<p><strong>Please note: the result of this tutorial will only work as intended in browsers that support CSS transitions and animations.</strong></p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The Markup</h3>
<p>The HTML will consist of three major parts: the radio buttons and the labels, the container with the panels and their &#8220;slices&#8221; for each image, and the titles. The container with the class <strong>cr-bgimg</strong> part will have a division for each of the panels and inside we&#8217;ll place spans for every image with the right background position. So, the first panel will have four slices, each having the one of the images as background with the left-most position. The second panel will have again four slices but now the background position will be moved to be showing the next part of the respective image:</p>
<pre class="brush:xml">&lt;section class="cr-container"&gt;			

	&lt;!-- radio buttons and labels --&gt;
	&lt;input id="select-img-1" name="radio-set-1" type="radio" class="cr-selector-img-1" checked/&gt;
	&lt;label for="select-img-1" class="cr-label-img-1"&gt;1&lt;/label&gt;

	&lt;input id="select-img-2" name="radio-set-1" type="radio" class="cr-selector-img-2" /&gt;
	&lt;label for="select-img-2" class="cr-label-img-2"&gt;2&lt;/label&gt;

	&lt;input id="select-img-3" name="radio-set-1" type="radio" class="cr-selector-img-3" /&gt;
	&lt;label for="select-img-3" class="cr-label-img-3"&gt;3&lt;/label&gt;

	&lt;input id="select-img-4" name="radio-set-1" type="radio" class="cr-selector-img-4" /&gt;
	&lt;label for="select-img-4" class="cr-label-img-4"&gt;4&lt;/label&gt;

	&lt;div class="clr"&gt;&lt;/div&gt;	

	&lt;!-- panels --&gt;
	&lt;div class="cr-bgimg"&gt;
		&lt;div&gt;
			&lt;span&gt;Slice 1 - Image 1&lt;/span&gt;
			&lt;span&gt;Slice 1 - Image 2&lt;/span&gt;
			&lt;span&gt;Slice 1 - Image 3&lt;/span&gt;
			&lt;span&gt;Slice 1 - Image 4&lt;/span&gt;
		&lt;/div&gt;
		&lt;div&gt;
			&lt;span&gt;Slice 2 - Image 1&lt;/span&gt;
			&lt;span&gt;Slice 2 - Image 2&lt;/span&gt;
			&lt;span&gt;Slice 2 - Image 3&lt;/span&gt;
			&lt;span&gt;Slice 2 - Image 4&lt;/span&gt;
		&lt;/div&gt;
		&lt;div&gt;
			&lt;span&gt;Slice 3 - Image 1&lt;/span&gt;
			&lt;span&gt;Slice 3 - Image 2&lt;/span&gt;
			&lt;span&gt;Slice 3 - Image 3&lt;/span&gt;
			&lt;span&gt;Slice 3 - Image 4&lt;/span&gt;
		&lt;/div&gt;
		&lt;div&gt;
			&lt;span&gt;Slice 4 - Image 1&lt;/span&gt;
			&lt;span&gt;Slice 4 - Image 2&lt;/span&gt;
			&lt;span&gt;Slice 4 - Image 3&lt;/span&gt;
			&lt;span&gt;Slice 4 - Image 4&lt;/span&gt;
		&lt;/div&gt;
	&lt;/div&gt;

	&lt;!-- titles --&gt;
	&lt;div class="cr-titles"&gt;
		&lt;h3&gt;
			&lt;span&gt;Serendipity&lt;/span&gt;
			&lt;span&gt;What you've been dreaming of&lt;/span&gt;
		&lt;/h3&gt;
		&lt;h3&gt;
			&lt;span&gt;Adventure&lt;/span&gt;
			&lt;span&gt;Where the fun begins&lt;/span&gt;
		&lt;/h3&gt;
		&lt;h3&gt;
			&lt;span&gt;Nature&lt;/span&gt;
			&lt;span&gt;Unforgettable eperiences&lt;/span&gt;
		&lt;/h3&gt;
		&lt;h3&gt;
			&lt;span&gt;Serenity&lt;/span&gt;
			&lt;span&gt;When silence touches nature&lt;/span&gt;
		&lt;/h3&gt;
	&lt;/div&gt;

&lt;/section&gt;</pre>
<p>The h3 elements for the titles will have two spans, one for the main headline and one for the sub-headline.</p>
<p>Let&#8217;s style this baby.</p>
<h3>The CSS</h3>
<p><em>I will omit all the vendor prefixes, but you will, of course, find them in the files.</em><br />
<em>We&#8217;ll be going through the style of demo 1.</em></p>
<p>Our aim is to first hide those radio buttons by covering them up with labels. In web browsers, clicking on a label will make the respective checkbox or radio button selected. Giving an ID to the input, we can use the <a href="http://www.w3.org/TR/html4/interact/forms.html#adef-for">for = idref</a> attribute of the label to reference the respective input.</p>
<p>Second, we want to place all the background images correctly and third, we want to show the respective image slices and titles when clicking on a label.</p>
<p>So, lets first syle the section and give it a white border with some subtle box box shadow:</p>
<pre class="brush:css">.cr-container{
	width: 600px;
	height: 400px;
	position: relative;
	margin: 0 auto;
	border: 20px solid #fff;
	box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}</pre>
<p>Since we want to use the general sibling selector in order to &#8220;reach&#8221; the right image slices and titles, we need to place the labels before those containers. Let&#8217;s make sure that they are on top as a layer (z-index) and push its position down by adding a top margin of 350px;</p>
<pre class="brush:css">.cr-container label{
	font-style: italic;
	width: 150px;
	height: 30px;
	cursor: pointer;
	color: #fff;
	line-height: 32px;
	font-size: 24px;
	float:left;
	position: relative;
	margin-top: 350px;
	z-index: 1000;
}</pre>
<p>Let&#8217;s prettify the label by adding a little circle. We&#8217;ll create a pseudo element and place it centered behind the label text:</p>
<pre class="brush:css">.cr-container label:before{
	content:'';
	width: 34px;
	height: 34px;
	background: rgba(130,195,217,0.9);
	position: absolute;
	left: 50%;
	margin-left: -17px;
	border-radius: 50%;
	box-shadow: 0px 0px 0px 4px rgba(255,255,255,0.3);
	z-index:-1;
}</pre>
<p>In order to create a separation between the panels we&#8217;ll use a little trick. We&#8217;ll create another pseudo-element for the label and extend it to stretch over the panel. Using a gradient, we&#8217;ll make the line &#8220;fade out&#8221; at the top:</p>
<pre class="brush:css">.cr-container label:after{
	width: 1px;
	height: 400px;
	content: '';
	background: linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%);
	position: absolute;
	bottom: -20px;
	right: 0px;
}</pre>
<p>The last panel should not have that line so we simply give it 0 width:</p>
<pre class="brush:css">.cr-container label.cr-label-img-4:after{
	width: 0px;
}</pre>
<p>Now, that we&#8217;ve taken care of the label look, we can hide the inputs:</p>
<pre class="brush:css">.cr-container input{
	display: none;
}</pre>
<p>Whenever we click on a label, the respective input gets checked. Now we can target the respective label using the general sibling selector. So, we will change the color the &#8220;selected&#8221; label:</p>
<pre class="brush:css">.cr-container input.cr-selector-img-1:checked ~ label.cr-label-img-1,
.cr-container input.cr-selector-img-2:checked ~ label.cr-label-img-2,
.cr-container input.cr-selector-img-3:checked ~ label.cr-label-img-3,
.cr-container input.cr-selector-img-4:checked ~ label.cr-label-img-4{
	color: #68abc2;
}</pre>
<p>And we&#8217;ll also change the background color and box shadow of its cicle pseudo-element:</p>
<pre class="brush:css">.cr-container input.cr-selector-img-1:checked ~ label.cr-label-img-1:before,
.cr-container input.cr-selector-img-2:checked ~ label.cr-label-img-2:before,
.cr-container input.cr-selector-img-3:checked ~ label.cr-label-img-3:before,
.cr-container input.cr-selector-img-4:checked ~ label.cr-label-img-4:before{
	background: #fff;
	box-shadow: 0px 0px 0px 4px rgba(104,171,194,0.6);
}</pre>
<p>The container for the image panels will occupy all the width and it will be positioned absolutely. This container will be used later in order to set the background image to the currently selected image. We need to do this in order to have an image visible by default. So we&#8217;ll also add some background properties already:</p>
<pre class="brush:css">.cr-bgimg{
	width: 600px;
	height: 400px;
	position: absolute;
	left: 0px;
	top: 0px;
	z-index: 1;
	background-repeat: no-repeat;
	background-position: 0 0;
}</pre>
<p>Since we have four panels/images, one panel will have the width of 150 pixels (600 divided by 4). The panels will be floating left and we&#8217;ll hide their overflow since we don&#8217;t want to see the slices coming out when we slide them:</p>
<pre class="brush:css">.cr-bgimg div{
	width: 150px;
	height: 100%;
	position: relative;
	float: left;
	overflow: hidden;
	background-repeat: no-repeat;
}</pre>
<p>Each slice span will be positioned absolutely and initially, they will be hidden by placing them out of the panel with a left of -150px:</p>
<pre class="brush:css">.cr-bgimg div span{
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0px;
	left: -150px;
	z-index: 2;
	text-indent: -9000px;
}</pre>
<p>Now, let&#8217;s take care of the background of the image container and the respective image slices:</p>
<pre class="brush:css">.cr-container input.cr-selector-img-1:checked ~ .cr-bgimg,
.cr-bgimg div span:nth-child(1){
	background-image: url(../images/1.jpg);
}
.cr-container input.cr-selector-img-2:checked ~ .cr-bgimg,
.cr-bgimg div span:nth-child(2){
	background-image: url(../images/2.jpg);
}
.cr-container input.cr-selector-img-3:checked ~ .cr-bgimg,
.cr-bgimg div span:nth-child(3){
	background-image: url(../images/3.jpg);
}
.cr-container input.cr-selector-img-4:checked ~ .cr-bgimg,
.cr-bgimg div span:nth-child(4){
	background-image: url(../images/4.jpg);
}</pre>
<p>We also need to give the right background position to the slices depending on the panel:</p>
<pre class="brush:css">.cr-bgimg div:nth-child(1) span{
	background-position: 0px 0px;
}
.cr-bgimg div:nth-child(2) span{
	background-position: -150px 0px;
}
.cr-bgimg div:nth-child(3) span{
	background-position: -300px 0px;
}
.cr-bgimg div:nth-child(4) span{
	background-position: -450px 0px;
}</pre>
<p>When we click on a label we will simply slide all the slices out to the right:</p>
<pre class="brush:css">.cr-container input:checked ~ .cr-bgimg div span{
	animation: slideOut 0.6s ease-in-out;
}
@keyframes slideOut{
	0%{
		left: 0px;
	}
	100%{
		left: 150px;
	}
}</pre>
<p>&#8230;all except the slices with the respective background image. Those will slide in from -150px to 0px:</p>
<pre class="brush:css">.cr-container input.cr-selector-img-1:checked ~ .cr-bgimg div span:nth-child(1),
.cr-container input.cr-selector-img-2:checked ~ .cr-bgimg div span:nth-child(2),
.cr-container input.cr-selector-img-3:checked ~ .cr-bgimg div span:nth-child(3),
.cr-container input.cr-selector-img-4:checked ~ .cr-bgimg div span:nth-child(4)
{
	transition: left 0.5s ease-in-out;
	animation: none;
	left: 0px;
	z-index: 10;
}</pre>
<p>Last, but not least, we want to style the h3 title elements and their spans. The h3 will have a opacity transition and once we select the respective label/input the opacity will increase from 0 to 1:</p>
<pre class="brush:css">.cr-titles h3{
	position: absolute;
	width: 100%;
	text-align: center;
	top: 50%;
	z-index: 10000;
	opacity: 0;
	color: #fff;
	text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
	transition: opacity 0.8s ease-in-out;
}
.cr-titles h3 span:nth-child(1){
	font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif;
	font-size: 70px;
	display: block;
	letter-spacing: 7px;
}
.cr-titles h3 span:nth-child(2){
	letter-spacing: 0px;
	display: block;
	background: rgba(104,171,194,0.9);
	font-size: 14px;
	padding: 10px;
	font-style: italic;
	font-family: Cambria, Palatino, "Palatino Linotype", "Palatino LT STD", Georgia, serif;
}
.cr-container input.cr-selector-img-1:checked ~ .cr-titles h3:nth-child(1),
.cr-container input.cr-selector-img-2:checked ~ .cr-titles h3:nth-child(2),
.cr-container input.cr-selector-img-3:checked ~ .cr-titles h3:nth-child(3),
.cr-container input.cr-selector-img-4:checked ~ .cr-titles h3:nth-child(4){
	opacity: 1;
}</pre>
<p>If you don&#8217;t want to use the label trick on mobile devices you could, for example, use a media query:</p>
<pre class="brush:css">@media screen and (max-width: 768px) {
	.cr-container input{
		display: inline;
		width: 24%;
		margin-top: 350px;
		z-index: 1000;
		position: relative;
	}
	.cr-container label{
		display: none;
	}
}</pre>
<p>This is just a quick solution and it might be better to check, <a href="http://v4.thewatchmakerproject.com/blog/how-to-fix-the-broken-ipad-form-label-click-issue/">if the label trick is supported</a>.</p>
<p>And that&#8217;s it! There are many possibilities of animations that can be done here. Check out the demos to see more.</p>
<h3>Demos</h3>
<ol>
<li><strong><a href="http://tympanus.net/Tutorials/CSS3SlidingImagePanels/index.html">Demo 1: Slide to right</a></strong></li>
<li><strong><a href="http://tympanus.net/Tutorials/CSS3SlidingImagePanels/index2.html">Demo 2: Odd/even slide to left/right</a></strong></li>
<li><strong><a href="http://tympanus.net/Tutorials/CSS3SlidingImagePanels/index3.html">Demo 3: Odd/even slide up/down</a></strong></li>
<li><strong><a href="http://tympanus.net/Tutorials/CSS3SlidingImagePanels/index4.html">Demo 4: Scale up/down</a></strong></li>
</ol>
<p>And that&#8217;s it! I hope you enjoyed this tutorial and find it inspiring!</p>
<p><a class="demo" href="http://tympanus.net/Tutorials/CSS3SlidingImagePanels/">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/CSS3SlidingImagePanels/CSS3SlidingImagePanels.zip">Download source</a></p>
<div class="googlead"></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2012/01/17/sliding-image-panels-with-css3/feed/</wfw:commentRss>
		<slash:comments>48</slash:comments>
		</item>
		<item>
		<title>CSS Buttons with Pseudo-elements</title>
		<link>http://tympanus.net/codrops/2012/01/11/css-buttons-with-pseudo-elements/</link>
		<comments>http://tympanus.net/codrops/2012/01/11/css-buttons-with-pseudo-elements/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 16:42:09 +0000</pubDate>
		<dc:creator>Sergio Camalich</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[::before]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[gradients]]></category>
		<category><![CDATA[pseudo-elements]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=7170</guid>
		<description><![CDATA[In this tutorial, I'll show you how to create buttons with a twist, using just one anchor tag per button and the great power of CSS.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Tutorials/CSSButtonsPseudoElements/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/cssbuttons_main1.jpg" alt="cssbuttons_main" title="" width="580" height="315" class="aligncenter size-full wp-image-7259" /></a></p>
<p><a class="demo" href="http://tympanus.net/Tutorials/CSSButtonsPseudoElements/">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/CSSButtonsPseudoElements/CSSButtonsPseudoElements.zip">Download source</a></p>
<p>Hola, amigos. For the last month or so, I&#8217;ve been experimenting with the power of CSS pseudo-elements, specially when it comes to mixing them with buttons and that way recreating some great effects that were only possible to do with sprites, in the past.</p>
<p>In this tutorial, I&#8217;ll show you how to create buttons with a twist, using just one anchor tag per button and the great power of CSS.</p>
<p>The font used is &#8216;Open Sans&#8217; by <a href="https://profiles.google.com/107777320916704234605/about">Steve Matteson</a>.</p>
<p><strong>Disclaimer:</strong><br />
<em>I&#8217;ll not be using CSS vendor prefixes in this tutorial or else it would be crazy long, but you will find them in the downloadable files.</p>
<p>I avoided CSS transitions since, right now, Firefox is the only browser that supports them on pseudo-elements. Plus, I believe that these buttons work just fine without them.</em></p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h4>Markup</h4>
<p>The structure of all these buttons needs just one anchor tag for it to work, since we will be creating the other elements with the ::before pseudo-class.</p>
<pre class="brush:xml">
<a href="#" class="a_demo_one">
     Click me!
</a>
</pre>
<h3>Example 1</h3>
<p><a href="http://tympanus.net/Tutorials/CSSButtonsPseudoElements/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/cssbuttons_01.jpg" alt="cssbuttons_01" title="" width="580" height="250" class="aligncenter size-full wp-image-7246" /></a></p>
<p>I think this is the easiest one, with a very regular CSS.</p>
<h4>CSS</h4>
<p>First of all, we will give the general style of the button, including its active state. It is important to notice the relative positioning, since it will help us later with the positioning of the ::before element:</p>
<pre class="brush:css">
.a_demo_one {
	background-color:#ba2323;
	padding:10px;
	position:relative;
	font-family: 'Open Sans', sans-serif;
	font-size:12px;
	text-decoration:none;
	color:#fff;
	border: solid 1px #831212;
	background-image: linear-gradient(bottom, rgb(171,27,27) 0%, rgb(212,51,51) 100%);
	border-radius: 5px;
}

.a_demo_one:active {
	padding-bottom:9px;
	padding-left:10px;
	padding-right:10px;
	padding-top:11px;
	top:1px;
	background-image: linear-gradient(bottom, rgb(171,27,27) 100%, rgb(212,51,51) 0%);
}
</pre>
<p>Then, we create the gray container using the ::before pseudo-element. Absolute positioning makes our life easier to, believe it or not, position our element:</p>
<pre class="brush:css">
.a_demo_one::before {
	background-color:#ccd0d5;
	content:"";
	display:block;
	position:absolute;
	width:100%;
	height:100%;
	padding:8px;
	left:-8px;
	top:-8px;
	z-index:-1;
	border-radius: 5px;
	box-shadow: inset 0px 1px 1px #909193, 0px 1px 0px #fff;
}
</pre>
<h3>Example 2</h3>
<p><a href="http://tympanus.net/Tutorials/CSSButtonsPseudoElements/index2.html"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/cssbuttons_021.jpg" alt="cssbuttons_02" title="" width="580" height="250" class="aligncenter size-full wp-image-7258" /></a></p>
<p>This one is a little bit more complex because of the 3D&#8217;ish look. This button is outside of its &#8216;container&#8217;, but when you click it, it goes down:</p>
<h4>CSS</h4>
<pre class="brush:css">
.a_demo_two {
	background-color:#6fba26;
	padding:10px;
	position:relative;
	font-family: 'Open Sans', sans-serif;
	font-size:12px;
	text-decoration:none;
	color:#fff;
	background-image: linear-gradient(bottom, rgb(100,170,30) 0%, rgb(129,212,51) 100%);
	box-shadow: inset 0px 1px 0px #b2f17f, 0px 6px 0px #3d6f0d;
	border-radius: 5px;
}

.a_demo_two:active {
	top:7px;
	background-image: linear-gradient(bottom, rgb(100,170,30) 100%, rgb(129,212,51) 0%);
	box-shadow: inset 0px 1px 0px #b2f17f, inset 0px -1px 0px #3d6f0d;
	color: #156785;
	text-shadow: 0px 1px 1px rgba(255,255,255,0.3);
	background: rgb(44,160,202);
}
</pre>
<p><strong>And here&#8217;s the tricky part: </strong></p>
<p>Since the position of the pseudo-element depends on its parent, once the parent moves down a few pixels, you have to move up the pseudo-element that same amount of pixels.</p>
<pre class="brush:css">
.a_demo_two::before {
	background-color:#072239;
	content:"";
	display:block;
	position:absolute;
	width:100%;
	height:100%;
	padding-left:2px;
	padding-right:2px;
	padding-bottom:4px;
	left:-2px;
	top:5px;
	z-index:-1;
	border-radius: 6px;
	box-shadow: 0px 1px 0px #fff;
}

.a_demo_two:active::before {
	top:-2px;
}
</pre>
<h3>Example 3</h3>
<p><a href="http://tympanus.net/Tutorials/CSSButtonsPseudoElements/index3.html"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/cssbuttons_03.jpg" alt="cssbuttons_03" title="" width="580" height="250" class="aligncenter size-full wp-image-7248" /></a></p>
<p>I think this one is my favorite since it was the first one I ever made this way and people seem to really like it. It is a divided button that &#8220;breaks&#8221; once you click it.</p>
<h4>CSS</h4>
<p>Again, the first thing we have to do is create the lighter part. In here, you&#8217;ll notice a right margin, this is in order to compensate for the width of the pseudo-element if you want to center the button. You don&#8217;t need it if that is not a problem for you.</p>
<pre class="brush:css">
.a_demo_three {
	background-color:#3bb3e0;
	font-family: 'Open Sans', sans-serif;
	font-size:12px;
	text-decoration:none;
	color:#fff;
	position:relative;
	padding:10px 20px;
	border-left:solid 1px #2ab7ec;
	margin-left:35px;
	background-image: linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
	border-top-right-radius: 5px;
	border-bottom-right-radius: 5px;
	box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #156785, 0px 10px 5px #999;
}

.a_demo_three:active {
	top:3px;
	background-image: linear-gradient(bottom, rgb(62,184,229) 0%, rgb(44,160,202) 100%);
	box-shadow: inset 0px 1px 0px #2ab7ec, 0px 2px 0px 0px #156785, 0px 5px 3px #999;
}
</pre>
<p>And then the pseudo-element&#8217;s CSS:</p>
<pre class="brush:css">
.a_demo_three::before {
	content:"·";
	width:35px;
	max-height:29px;
	height:100%;
	position:absolute;
	display:block;
	padding-top:8px;
	top:0px;
	left:-36px;
	font-size:16px;
	font-weight:bold;
	color:#8fd1ea;
	text-shadow:1px 1px 0px #07526e;
	border-right:solid 1px #07526e;
	background-image: linear-gradient(bottom, rgb(10,94,125) 0%, rgb(14,139,184) 100%);
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
	box-shadow:inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #032b3a, 0px 10px 5px #999 ;
}

.a_demo_three:active::before {
	top:-3px;
	box-shadow:inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #032b3a, 1px 1px 0px 0px #044a64, 2px 2px 0px 0px #044a64, 2px 5px 0px 0px #044a64, 6px 4px 2px #0b698b, 0px 10px 5px #999 ;
}
</pre>
<h3>Example 4</h3>
<p><a href="http://tympanus.net/Tutorials/CSSButtonsPseudoElements/index4.html"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/cssbuttons_04.jpg" alt="cssbutton_04" title="" width="580" height="250" class="aligncenter size-full wp-image-7249" /></a></p>
<p>This time, we will use the pseudo-element as a pointer, using one image as a background, though you can use some of those great <a href="http://css-tricks.com/examples/IconFont/">icon fonts</a>.</p>
<h4>CSS</h4>
<pre class="brush:css">
.a_demo_four {
	background-color:#4b3f39;
	font-family: 'Open Sans', sans-serif;
	font-size:12px;
	text-decoration:none;
	color:#fff;
	position:relative;
	padding:10px 20px;
	padding-right:50px;
	background-image: linear-gradient(bottom, rgb(62,51,46) 0%, rgb(101,86,78) 100%);
	border-radius: 5px;
	box-shadow: inset 0px 1px 0px #9e8d84, 0px 5px 0px 0px #322620, 0px 10px 5px #999;
}

.a_demo_four:active {
	top:3px;
	background-image: linear-gradient(bottom, rgb(62,51,46) 100%, rgb(101,86,78) 0%);
	box-shadow: inset 0px 1px 0px #9e8d84, 0px 2px 0px 0px #322620, 0px 5px 3px #999;
}

.a_demo_four::before {
	background-color:#322620;
	background-image:url(../images/right_arrow.png);
	background-repeat:no-repeat;
	background-position:center center;
	content:"";
	width:20px;
	height:20px;
	position:absolute;
	right:15px;
	top:50%;
	margin-top:-9px;
	border-radius: 50%;
	box-shadow: inset 0px 1px 0px #19120f, 0px 1px 0px #827066;
}

.a_demo_four:active::before {
	top:50%;
	margin-top:-12px;
	box-shadow: inset 0px 1px 0px #827066, 0px 3px 0px #19120f, 0px 6px 3px #382e29;
}
</pre>
<h3>Example 5</h3>
<p><a href="http://tympanus.net/Tutorials/CSSButtonsPseudoElements/index5.html"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/cssbuttons_05.jpg" alt="cssbuttons_05" title="" width="580" height="250" class="aligncenter size-full wp-image-7250" /></a></p>
<p>This example is a bit cheesy, I know, but you can use it in so many and really useful ways.</p>
<h4>CSS</h4>
<pre class="brush:css">
.a_demo_five {
	background-color:#9827d3;
	width:150px;
	display:inline-block;
	font-family: 'Open Sans', sans-serif;
	font-size:12px;
	text-decoration:none;
	color:#fff;
	position:relative;
	margin-top:40px;
	padding-bottom:10px;
	padding-top:10px;
	background-image: linear-gradient(bottom, rgb(168,48,232) 100%, rgb(141,32,196) 0%);
	border-bottom-right-radius: 5px;
	border-bottom-left-radius: 5px;
	box-shadow: inset 0px 1px 0px #ca73f8, 0px 5px 0px 0px #6a1099, 0px 10px 5px #999;
}

.a_demo_five:active {
	top:3px;
	background-image: linear-gradient(bottom, rgb(168,48,232) 0%, rgb(141,32,196) 100%);
	box-shadow: inset 0px 4px 1px #7215a3, 0px 2px 0px 0px #6a1099, 0px 5px 3px #999;
}

.a_demo_five::before {
	background-color:#fff;
	background-image:url(../images/heart.gif);
	background-repeat:no-repeat;
	background-position:center center;
	border-left:solid 1px #CCC;
	border-top:solid 1px #CCC;
	border-right:solid 1px #CCC;
	content:"";
	width:148px;
	height:40px;
	position:absolute;
	top:-30px;
	left:0px;
	margin-top:-11px;
	z-index:-1;
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
}

.a_demo_five:active::before {
	top: -33px;
	box-shadow: 0px 3px 0px #ccc;
}
</pre>
<h3>In the end</h3>
<p>And well, this is it, for now. Remember that these buttons are still kind of experimental, so not every browser supports them that well. </p>
<p>Thank you for reading this tutorial and I hope that you find it useful.</p>
<p><a class="demo" href="http://tympanus.net/Tutorials/CSSButtonsPseudoElements/">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/CSSButtonsPseudoElements/CSSButtonsPseudoElements.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2012/01/11/css-buttons-with-pseudo-elements/feed/</wfw:commentRss>
		<slash:comments>61</slash:comments>
		</item>
		<item>
		<title>Animated Web Banners With CSS3</title>
		<link>http://tympanus.net/codrops/2012/01/10/animated-web-banners-with-css3/</link>
		<comments>http://tympanus.net/codrops/2012/01/10/animated-web-banners-with-css3/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 12:28:04 +0000</pubDate>
		<dc:creator>Caleb Jacob</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ad]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[banner]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=6969</guid>
		<description><![CDATA[Today we're going to take a look at spicing up our web banners, ads or any content for that matter, with CSS3 animations.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Tutorials/AnimatedWebBanners/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/AnimatedWebBanners.jpg" alt="AnimatedWebBanners" width="580" height="315" class="aligncenter size-full wp-image-7199" /></a></p>
<p><a class="demo" href="http://tympanus.net/Tutorials/AnimatedWebBanners/">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/AnimatedWebBanners/AnimatedWebBanners.zip">Download source</a></p>
<p>Hey there folks! Today we&#8217;re going to take a look at spicing up our web banners, ads or any content for that matter, with CSS3 animations.</p>
<p>Firefox and WebKit browsers are currently the only browsers that support CSS animation, but we&#8217;ll take a look at how we can easily make these ads also function in other browsers (which I&#8217;ll affectionately refer to as 18th century browsers). However, don&#8217;t expect perfect support for all browsers (specifically IE 7 and lower) when experimenting with modern CSS techniques.</p>
<p>Ok then, let&#8217;s build some kick-butt, animated web banners!</p>
<p><em><strong>Please note:</strong> In order to save space, all vendor prefixes have been removed. Refer to the source files for the complete CSS. If you are unfamiliar with CSS animations, I&#8217;d highly recommend reading <a href="http://dev.w3.org/csswg/css3-animations/">this</a> first.</em></p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The Markup</h3>
<p>First off, we&#8217;re going to structure the ad&#8217;s elements by laying out the HTML. At this point, we&#8217;ll need to think through how we want the animation to function &#8211; as this will effect the child/parent structure of our markup (I&#8217;ll explain further below):</p>
<pre class="brush:html">
&lt;div id="ad-1"&gt;
	&lt;div id="content"&gt;
		&lt;h2&gt;Lost at sea?&lt;/h2&gt;
		&lt;h3&gt;Relax - we've got your rudder.&lt;/h3&gt;
		&lt;form&gt;
			&lt;input type="text" id="email" value="Email address..." /&gt;
			&lt;input type="submit" id="submit" value="Guide me" /&gt;
		&lt;/form&gt;
	&lt;/div&gt;
	&lt;div id="clouds"&gt;
		&lt;ul id="cloud-group-1"&gt;
			&lt;li class="cloud-1"&gt;&lt;/li&gt;
			&lt;li class="cloud-2"&gt;&lt;/li&gt;
			&lt;li class="cloud-3"&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul id="cloud-group-2"&gt;
			&lt;li class="cloud-1"&gt;&lt;/li&gt;
			&lt;li class="cloud-2"&gt;&lt;/li&gt;
			&lt;li class="cloud-3"&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;ul id="boat"&gt;
		&lt;li&gt;
			&lt;div id="question-mark"&gt;&lt;/div&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;ul id="water"&gt;
		&lt;li id="water-back"&gt;&lt;/li&gt;
		&lt;li id="water-front"&gt;&lt;/li&gt;
	&lt;/ul&gt;
&lt;/div&gt;
</pre>
<p><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/image1mpd.png" alt="image1mpd" title="" width="580" height="239" class="aligncenter size-full wp-image-7193" /></p>
<p>In order to understand our markup structure, let&#8217;s focus in on the boat for a second:</p>
<pre class="brush:html">
&lt;ul id="boat"&gt; &lt;!-- Groups the boat's elements --&gt;
	&lt;li&gt; &lt;!-- The boat itself --&gt;
		&lt;div id="question-mark"&gt;&lt;/div&gt; &lt;!-- The question mark (no crap) --&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>Now, when you view the first ad on the demo page, there are 3 separate animations taking place on the boat:</p>
<ol>
<li>
<p>An animation that slides the boat in from the left. This is applied directly to the unordered list (group).</p>
</li>
<li>
<p>An animation that gives the boat a nice bobbing effect &#8211; simulating the boat floating on water. This is applied directly to the list element (boat).</p>
</li>
<li>
<p>An animation that fades in the question mark. This is applied directly to the div (question mark).</p>
</li>
</ol>
<p>If you&#8217;re not already seasick, take another look at the demo page. You&#8217;ll see that the bobbing animation applied to the list item (the boat) also affects the div inside of it (the question mark). Similarly, the &#8220;slide in&#8221; animation that is applied to the unordered list (group) also affects the list item and div inside of it (the boat and question mark). This leads us to an important observation:</p>
<p><strong>Child elements take on their parent&#8217;s animation in addition to their own animation.</strong> With this knowledge added to our arsenal, we&#8217;re just a number of child/parent structures away from creating animations that&#8217;ll blow minds (and the processor on your Grandma&#8217;s laptop)!</p>
<h3>The CSS</h3>
<p>Before we jump into the really fun stuff and start animating, we still need to style the ad and come up with a pure CSS fallback for browsers stuck in the 18th century.</p>
<h4>The Fallback For 18th Century Browsers</h4>
<p>We&#8217;ll create a fallback by simply styling the markup as if CSS animations don&#8217;t exist (the thought of CSS animations being non-existent is enough to make any grown man cry &#8211; but hang in there with me). In other words, if our animations aren&#8217;t able to play, the ad should still look decent. This way, when someone is viewing your ad with an 18th century browser, they will see a normal, static web ad &#8211; instead of blank ad space.</p>
<p>For example: If someone were to use CSS like this, they&#8217;d be in trouble:</p>
<pre class="brush:css">
/* WRONG WAY! */

@keyframe our-fade-in-animation {
	0%   {opacity:0;}
	100% {opacity:1;}
}

div {
	opacity: 0; /* This div is hidden by default - a big no-no!*/
	animation: our-fade-in-animation 1s 1;
}
</pre>
<p>If a user&#8217;s browser doesn&#8217;t support animations, the div will remain invisible for the rest of its sad and lonely life. This is when their client breaks down the door of their office &#8211; chainsaw in hand &#8211; and demands to know why they haven&#8217;t sold a single too-too (or whatever their client is selling)! While failing to comprehend how a browser could be so pathetic, their life will end miserably as they curses Internet Explorer with their last breath&#8230;</p>
<p>Don&#8217;t worry though &#8211; neither of us have to be in that poor, developer&#8217;s shoes. This is how we&#8217;ll provide increased browser support:</p>
<pre class="brush:css">
/* CORRECT WAY */

@keyframe our-fade-in-animation {
	0%   {opacity:0;}
	100% {opacity:1;}
}

div {
	opacity: 1; /* This div is visible by default */
	animation: our-fade-in-animation 1s 1;
}
</pre>
<p>As you can see, the div will show even if the animation is not able to play. If the animation is able to play like God intended, the div will instantly hide and the epic animation you created will follow through.</p>
<h4>The Meat</h4>
<p>Now that we know how to make our animated ads play nicely with 18th century browsers (and avoid being hacked to pieces by our clients), let&#8217;s get to the meat of the CSS and lay this ad out.</p>
<p>While we are doing this, there are 3 key things to keep in mind:</p>
<ol>
<li>
<p>Since these ads could be used on different websites, we&#8217;ll <strong>make all of our CSS selections very specific.</strong> We&#8217;ll do this by starting every selector with the id: #ad-1. This will keep our ad&#8217;s styles from interfering with existing styles and elements.</p>
</li>
<li>
<p><strong>We will purposefully ignore the animation delay feature</strong> when setting up our animations. If we used the animation delay feature, as well as styling our elements the correct way (visible by default), things would abruptly fly off the screen (or hide) when their animation finally played. This is why it&#8217;s key for our animations to start instantly &#8211; allowing our animations enough time to hide and move elements off the screen before they actually display. We will <strong>simulate an animation delay by increasing the duration of the animation and manually adjusting keyframes.</strong> You&#8217;ll see examples of this when we start animating.</p>
</li>
<li>
<p>Whenever possible, <strong>use one animation for multiple elements.</strong> This way we can save a lot of time and cut down on code bloat (nobody wants a sumo sitting on their bandwidth). You can create slightly different effects with the same animation by adjusting duration and easing.</p>
</li>
</ol>
<p></em></p>
<p>Alrighty, we&#8217;ll start by setting up our &#8220;canvas&#8221; for the ad. Let&#8217;s make sure it has a relative position so that element&#8217;s inside can be positioned correctly. We also need to make sure that any overflow is hidden:</p>
<pre class="brush:css">
#ad-1 {
	width: 720px;
	height: 300px;
	float: left;
	margin: 40px auto 0;
	background-image: url(../images/ad-1/background.png);
	background-position: center;
	background-repeat: no-repeat;
	overflow: hidden;
	position: relative;
	box-shadow: 0px 0px 6px #000;
}
</pre>
<p>Next, we&#8217;ll style the text and input fields and call for the corresponding animations. We also want to make sure this content has the highest z-index of all our moving parts &#8211; that way it can&#8217;t be accidentally covered up:</p>
<pre class="brush:css">
#ad-1 #content {
	width: 325px;
	float: right;
	margin: 40px;
	text-align: center;
	z-index: 4;
	position: relative;
	overflow: visible;
}
#ad-1 h2 {
	font-family: 'Alfa Slab One', cursive;
	color: #137dd5;
	font-size: 50px;
	line-height: 50px;
	text-shadow: 0px 0px 4px #fff;
	animation: delayed-fade-animation 7s 1 ease-in-out; /* This will fade in our h2 with a simulated delay */
}
#ad-1 h3 {
	font-family: 'Boogaloo', cursive;
	color: #202224;
	font-size: 31px;
	line-height: 31px;
	text-shadow: 0px 0px 4px #fff;
	animation: delayed-fade-animation 10s 1 ease-in-out; /* This will fade in our h3 with a simulated delay */
}
#ad-1 form {
	margin: 30px 0 0 6px;
	position: relative;
	animation: form-animation 12s 1 ease-in-out;  /* This will slide in our email address form with a cool elastic effect. This also has a simulated delay */
}
#ad-1 #email {
	width: 158px;
	height: 48px;
	float: left;
	padding: 0 20px;
	font-size: 16px;
	font-family: 'Lucida Grande', sans-serif;
	color: #fff;
	text-shadow: 1px 1px 0px #a2917d;
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
	border:1px solid #a2917d;
	outline: none;
	box-shadow: -1px -1px 1px #fff;
	background-color: #c7b29b;
	background-image: linear-gradient(bottom, rgb(216,201,185) 0%, rgb(199,178,155) 100%);
}
#ad-1 #email:focus {
	background-image: linear-gradient(bottom, rgb(199,178,155) 0%, rgb(199,178,155) 100%);

}
#ad-1 #submit {
	height: 50px;
	float: left;
	cursor: pointer;
	padding: 0 20px;
	font-size: 20px;
	font-family: 'Boogaloo', cursive;
	color: #137dd5;
	text-shadow: 1px 1px 0px #fff;
	border-top-right-radius: 5px;
	border-bottom-right-radius: 5px;
	border:1px solid #bcc0c4;
	border-left: none;
	background-color: #fff;
	background-image: linear-gradient(bottom, rgb(245,247,249) 0%, rgb(255,255,255) 100%);
}
#ad-1 #submit:hover {
	background-image: linear-gradient(bottom, rgb(255,255,255) 0%, rgb(255,255,255) 100%);
}
</pre>
<p>Now we&#8217;re going to style the water and call for the corresponding animations:</p>
<pre class="brush:css">
#ad-1 ul#water{
	/* If we wanted to add another animation to the water (move it horizontally for instance), we could do that here */
}
#ad-1 li#water-back {
	width: 1200px;
	height: 84px;
	background-image: url(../images/ad-1/water-back.png);
	background-repeat: repeat-x;
	z-index: 1;
	position: absolute;
	bottom: 10px;
	left: -20px;
	animation: water-back-animation 3s infinite ease-in-out; /* Bobbing water effect */
}
#ad-1 li#water-front {
	width: 1200px;
	height: 158px;
	background-image: url(../images/ad-1/water-front.png);
	background-repeat: repeat-x;
	z-index: 3;
	position: absolute;
	bottom: -70px;
	left:-30px;
	animation: water-front-animation 2s infinite ease-in-out; /* Another bobbing water effect - yet slightly different. We'll make this animation move a little bit faster in order to create some perspective. */
}
</pre>
<p>Let&#8217;s style the boat and all of its elements. Again, we&#8217;ll need to make calls for the corresponding animations:</p>
<pre class="brush:css">
#ad-1 ul#boat {
	width: 249px;
	height: 215px;
	z-index: 2;
	position: absolute;
	bottom: 25px;
	left: 20px;
	overflow: visible;
	animation: boat-in-animation 3s 1 ease-out; /* Slides the group in when ad starts */
}
#ad-1 ul#boat li {
	width: 249px;
	height: 215px;
	background-image: url(../images/ad-1/boat.png);
	position: absolute;
	bottom: 0px;
	left: 0px;
	overflow: visible;
	animation: boat-animation 2s infinite ease-in-out; /* Simulate the boat bobbing on the water - similar to the animation already used on the water itself. */
}
#ad-1 #question-mark {
	width: 24px;
	height: 50px;
	background-image: url(../images/ad-1/question-mark.png);
	position: absolute;
	right: 34px;
	top: -30px;
	animation: delayed-fade-animation 4s 1 ease-in-out; /* Fade in the question mark */
}
</pre>
<p>Last but not least, we&#8217;ll style the cloud groups and the single clouds. We&#8217;ll also call a pretty nifty animation that will give them a continuous, scrolling effect. Here&#8217;s an illustration of what&#8217;s going on:</p>
<p><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/image2w.png" alt="image2w" title="" width="580" height="418" class="aligncenter size-full wp-image-7194" /></p>
<p>Now here&#8217;s the CSS:</p>
<pre class="brush:css">
#ad-1 #clouds {
	position: absolute;
	top: 0px;
	z-index: 0;
	animation: cloud-animation 30s infinite linear; /* Scrolls the clouds off to the left, resets, and repeats */
}
#ad-1 #cloud-group-1 {
	width:720px;
	position: absolute;
	left:0px;
}
#ad-1 #cloud-group-2 {
	width: 720px;
	position: absolute;
	left: 720px;
}
#ad-1 .cloud-1 {
	width: 172px;
	height: 121px;
	background-image: url(../images/ad-1/cloud-1.png);
	position: absolute;
	top: 10px;
	left: 40px;
}
#ad-1 .cloud-2 {
	width: 121px;
	height: 75px;
	background-image: url(../images/ad-1/cloud-2.png);
	position: absolute;
	top: -25px;
	left: 300px;
}
#ad-1 .cloud-3 {
	width: 132px;
	height: 105px;
	background-image: url(../images/ad-1/cloud-3.png);
	position: absolute;
	top: -5px;
	left: 530px;
}
</pre>
<p>Phew! That was a lot of CSS. Hang in there, the fun part is next!</p>
<h4>The Animations</h4>
<p><em><strong>Remember:</strong> Up to this point, nothing is actually being animated. If you were to view the ad now, you would see what 18th century browsers will render &#8211; a static ad. We will now actually create the animations we have previously called for in our CSS.</em></p>
<p>Now that our ad is displaying nicely, let&#8217;s give this static ad a shock and bring it to life (horrible pun is 100% intended)! Let&#8217;s jump right in &#8211; I&#8217;ll walk you through what&#8217;s going on in the comments:</p>
<pre class="brush:css">
/* An animation with a simulated delay used to fade in multiple elements. We've achieved a simulated delay by starting the fade in process 80% of the way through the animation (instead of starting the process immediately). We can use this technique and increase the animation duration on any element to reach the desired delay duration: */

@keyframes delayed-fade-animation {
	0%   {opacity: 0;}
	80%  {opacity: 0;}
	100% {opacity: 1;}
}

/* An animation that will slide in our email address form. We've spiced this animation up by overshooting the desired position and sliding it back - this creates a nice elastic effect. As you can see, this animation also uses a simulated delay: */

@keyframes form-animation {
	0%   {opacity: 0; right: -400px;}
	90%  {opacity: 0; right: -400px;}
	95%  {opacity: 0.5; right: 20px;}
	100% {opacity: 1; right: 0px;}
}

/* This is as basic as an animation gets. Only two keyframes and no simulated delay. This animation slides the boat in from the left when the ad begins: */

@keyframes boat-in-animation {
	0%   {left: -200px;}
	100% {left: 20px;}
}

/* Here's our really cool cloud animation. The first group of clouds will start off aligned in the center with the second group off to the right of the screen. While the left group of clouds is sliding off the screen to the left, the right group will begin to appear on the right side of the screen. As soon as the left group is completely off the screen, the clouds will reset (very quickly) to their original positions and repeat: */

@keyframes cloud-animation {
	0%       {left: 0px;}
	99.9999%   {left: -720px;}
	100%     {left: 0px;}
}

/* These last 3 animations are all basically the same - the only difference being the position of each element. They will emulate the bobbing effect of an ocean: */

@keyframes boat-animation {
	0%   {bottom: 0px; left: 0px;}
	25%  {bottom: -2px; left: -2px;}
	70%  {bottom: 2px; left: -4px;}
	100% {bottom: -1px; left: 0px;}
}
@keyframes water-back-animation {
	0%   {bottom: 10px; left: -20px;}
	25%  {bottom: 8px; left: -22px;}
	70%  {bottom: 12px; left: -24px;}
	100% {bottom: 9px; left: -20px;}
}
@keyframes water-front-animation {
	0%   {bottom: -70px; left: -30px;}
	25%  {bottom: -68px; left: -32px;}
	70%  {bottom: -72px; left: -34px;}
	100% {bottom: -69px; left: -30px;}
}
</pre>
<p>Presto! Our ad has finally come to life. :)</p>
<h3>In Closing</h3>
<p>During the course of this tutorial, we learned the key concepts of creating animated, 18th century browser supporting(ish) web ads:</p>
<ol>
<li>Child elements take on their parent&#8217;s animation in addition to their own animation. We can use this to create more complex animations.</li>
<li>When styling our ads, we should use very specific selectors so that our ads won&#8217;t interfere with existing CSS.</li>
<li>Position and style elements so that if our animations aren&#8217;t able to run, the ad will still look decent.</li>
<li>When possible, use one animation for multiple elements &#8211; save time and code bloat.</li>
<li>Frequently refer to Internet Explorer as &#8220;the 18th century browser&#8221; while shaking your fist in disgust and anger.</li>
</ol>
<p>Don&#8217;t let your creativity be limited by these examples &#8211; there are plenty of other creative things you can do with CSS animations that I didn&#8217;t cover. For instance, try playing around with CSS transformations.</p>
<p>Thanks for reading and happy CSS&#8217;ing!</p>
<p><a class="demo" href="http://tympanus.net/Tutorials/AnimatedWebBanners/">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/AnimatedWebBanners/AnimatedWebBanners.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2012/01/10/animated-web-banners-with-css3/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  tympanus.net/codrops/tag/css3/feed/ ) in 0.29724 seconds, on Feb 7th, 2012 at 12:00 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 7th, 2012 at 1:00 pm UTC -->
