<?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; Navigation</title>
	<atom:link href="http://tympanus.net/codrops/tag/navigation/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>Examples of Fresh Effects in Web Design</title>
		<link>http://tympanus.net/codrops/2012/01/05/examples-of-fresh-effects-in-web-design/</link>
		<comments>http://tympanus.net/codrops/2012/01/05/examples-of-fresh-effects-in-web-design/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 11:01:03 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=7069</guid>
		<description><![CDATA[Having some fresh and maybe even unexpected effects on a website, can juice up the experience for the user. Be it a whole new and experimental way of navigating through the website or just a tiny surprising hover effect - fresh effects can spice up your design and bring some life to it. ]]></description>
			<content:encoded><![CDATA[<p><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/FreshEffects.jpg" alt="FreshEffects" title="" width="580" height="315" class="aligncenter size-full wp-image-7141" /></p>
<p>Having some fresh and maybe even unexpected effects on a website, can juice up the experience for the user. Be it a whole new and experimental way of navigating through the website or just a tiny surprising hover effect &#8211; fresh effects can spice up your design and bring some life to it. </p>
<p>We&#8217;ve collected some wonderful examples of such effects for your inspiration. Dive in!</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3><a href="http://editsquarterly.com/" target="_blank">Edits Quarterly × Ian Coyle</a></h3>
<p><a target="_blank" href="http://editsquarterly.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/editsquarterly.jpg" alt="" title="editsquarterly" width="580" height="360" class="aligncenter size-full wp-image-7071" /></a></p>
<p>Edits Quarterly is a great example of a whole new navigation experience. You can scroll down or simply use the arrow keys to view the beauty of it.</p>
<h3><a href="http://www.neotokio.it/" target="_blank">neotokio!</a></h3>
<p><a target="_blank" href="http://www.neotokio.it/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/neotokio.jpg" alt="" title="neotokio" width="580" height="360" class="aligncenter size-full wp-image-7074" /></a></p>
<p>Neotokio! will surprise you with different kind of animations while you scroll down the site.</p>
<h3><a href="http://kyan.com/" target="_blank">Kyan</a></h3>
<p><a target="_blank" href="http://kyan.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/kyan.jpg" alt="" title="kyan" width="580" height="360" class="aligncenter size-full wp-image-7077" /></a></p>
<p>Kyan has an awesome slider that just animates wonderfully has gives a real 3D feel to it.  </p>
<h3><a href="http://www.apbaxter.com/" target="_blank">Adrian Baxter</a></h3>
<p><a target="_blank" href="http://www.apbaxter.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/apbaxter.jpg" alt="" title="apbaxter" width="580" height="360" class="aligncenter size-full wp-image-7078" /></a></p>
<p>Adrian Baxter&#8217;s website has an interesting and original parallax effect. Oh, and don&#8217;t scare when you check out the contact form :)</p>
<h3><a href="http://alpisdesign.com/" target="_blank">Alpis Design</a></h3>
<p><a target="_blank" href="http://alpisdesign.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/alpisdesign.jpg" alt="" title="alpisdesign" width="580" height="360" class="aligncenter size-full wp-image-7091" /></a><br />
Here we have a nice hover effect in the about section.</p>
<h3><a href="http://wadach.com/" target="_blank">Dawid Wadach</a></h3>
<p><a target="_blank" href="http://wadach.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/wadach.jpg" alt="" title="wadach" width="580" height="360" class="aligncenter size-full wp-image-7079" /></a><br />
Dawid Wadach has a very interesting hover effect which reveals his portfolio items. A combination of lines and boxes that move make this effect very original.</p>
<h3><a href="http://www.dangersoffracking.com/" target="_blank">Dangers of Fracking</a></h3>
<p><a target="_blank" href="http://www.dangersoffracking.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/dangersoffracking.jpg" alt="" title="dangersoffracking" width="580" height="360" class="aligncenter size-full wp-image-7075" /></a><br />
&#8220;Dangers of Fracking&#8221; which is designed by brilliant Linda Dong, is just a beautiful on-scroll piece of art that explains the dangers of hydraulic fracturing, a process that is used to release natural gas. See, how the story is being told using this wonderful visualization method.</p>
<h3><a href="http://50.aigadc.org/" target="_blank">AIGA 50 DC</a></h3>
<p><a target="_blank" href="http://50.aigadc.org/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/aigadc.jpg" alt="" title="aigadc" width="580" height="360" class="aligncenter size-full wp-image-7082" /></a><br />
AIGA 50 uses this great &#8220;cut-out&#8221; technique that reveals the images of a slider which always seems to be beneath the other content slides. </p>
<h3><a href="http://createdm.com/" target="_blank">Create Digital Media</a></h3>
<p><a target="_blank" href="http://createdm.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/createdm.jpg" alt="" title="createdm" width="580" height="360" class="aligncenter size-full wp-image-7086" /></a><br />
Create Digital Media has a unique slider that shows content and images in an original way.</p>
<h3><a href="http://www.mezcalbuenviaje.com/" target="_blank">Mezcal Buen Viaje</a></h3>
<p><a target="_blank" href="http://www.mezcalbuenviaje.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/mezcalbuenviaje.jpg" alt="" title="mezcalbuenviaje" width="580" height="360" class="aligncenter size-full wp-image-7087" /></a><br />
Now, THAT I call a scrollbar! :) &#8220;Mescal Buen Viaje&#8221; is like entering another world: everything is very original, from the scrollbar to the navigation to the way images are displayed: it&#8217;s such a fresh experience. And check out those cute kolibris that flap their wings on scroll.</p>
<h3><a href="http://thegeekdesigner.com/" target="_blank">Alex Pierce</a></h3>
<p><a target="_blank" href="http://thegeekdesigner.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/thegeekdesigner.jpg" alt="" title="thegeekdesigner" width="580" height="360" class="aligncenter size-full wp-image-7090" /></a><br />
Alex Pierce has some nice sliding happening right after the page is loaded with CSS3 animations. Hovering over the main navigation will make the whole navigation bar move a bit. Also, other subtle (hover) effects make a visit to his website a really nice experience. And don&#8217;t you just love the typography?</p>
<h3><a href="http://www.styiens.com/" target="_blank">Styiens &#8211; Label Musical</a></h3>
<p><a target="_blank" href="http://www.styiens.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/styiens.jpg" alt="" title="styiens" width="580" height="360" class="aligncenter size-full wp-image-7132" /></a><br />
Styiens has a very interesting slider that moves around that central circular element. </p>
<h3><a href="http://20calendars.lavazza.com/" target="_blank">Lavazza 20Calendars</a></h3>
<p><a target="_blank" href="http://20calendars.lavazza.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/lavazza.jpg" alt="" title="lavazza" width="580" height="360" class="aligncenter size-full wp-image-7076" /></a><br />
20 Calendars of Lavazza uses a beautiful full-page accordion that slides open elegantly when clicking on one of the headlines.</p>
<h3><a href="http://www.sheltonfleming.co.uk/" target="_blank">Shelton Fleming</a></h3>
<p><a target="_blank" href="http://www.sheltonfleming.co.uk/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/sheltonfleming.jpg" alt="" title="sheltonfleming" width="580" height="360" class="aligncenter size-full wp-image-7080" /></a><br />
Shelton Fleming divides its content into &#8220;Experiences&#8221; and &#8220;Ideas&#8221;, presenting each on one side of the page and making their sub-content slide originally when opening a menu item.</p>
<h3><a href="http://www.boldidea.com/toast/" target="_blank">Toast!</a></h3>
<p><a target="_blank" href="http://www.boldidea.com/toast/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/boldidea.jpg" alt="" title="boldidea" width="580" height="360" class="aligncenter size-full wp-image-7081" /></a><br />
Toast! has a really cool and original slider.</p>
<h3><a href="http://fivethirtybrew.com/" target="_blank">Five Thirty Brew by blenderbox</a></h3>
<p><a target="_blank" href="http://fivethirtybrew.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/fivethirtybrew.jpg" alt="" title="fivethirtybrew" width="580" height="360" class="aligncenter size-full wp-image-7084" /></a><br />
Five Thirty Brew by blenderbox is an exciting scrolling roller-coaster that will present you their fine beer and the process of making it. </p>
<h3><a href="http://captaindash.com/" target="_blank">CaptainDash</a></h3>
<p><a target="_blank" href="http://captaindash.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/captaindash.jpg" alt="" title="captaindash" width="580" height="360" class="aligncenter size-full wp-image-7085" /></a><br />
The delicate and original layout and design of CaptainDash makes the sliding content very interesting.</p>
<h3><a href="http://sirjohnaday.com/" target="_blank">Sir John A Day</a></h3>
<p><a target="_blank" href="http://sirjohnaday.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2012/01/sirjohnaday.jpg" alt="" title="sirjohnaday" width="580" height="360" class="aligncenter size-full wp-image-7088" /></a><br />
Sir John A Day has some really cute subtle details that are not visible at first sight. But once you dive in, you will see those tiny animations, that complement this beautiful design and add life to it: there is something animating in <em>every</em> section of the page.</p>
<p><strong>We hope you liked this little collection and got inspired!</strong></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2012/01/05/examples-of-fresh-effects-in-web-design/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Creative CSS3 Animation Menus</title>
		<link>http://tympanus.net/codrops/2011/10/24/creative-css3-animation-menus/</link>
		<comments>http://tympanus.net/codrops/2011/10/24/creative-css3-animation-menus/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 16:14:52 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[transform]]></category>
		<category><![CDATA[transition]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=6159</guid>
		<description><![CDATA[Being in the mood for experimenting with CSS3, I'd like to show you some creative menu hover effects in today's tutorial. The idea is to have a simple composition of elements, an icon, a main title and a secondary title, that will be animated on hover using only CSS transitions and animations. We'll be exploring some different effects for the elements.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/CreativeCSS3Menus.jpg" alt="CreativeCSS3Menus" width="580" height="315" class="aligncenter size-full wp-image-6180" /></a></p>
<p><a class="demo" href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/CreativeCSS3AnimationMenus.zip">Download source</a></p>
<p>Being in the mood for experimenting with CSS3, I&#8217;d like to show you some creative menu hover effects in today&#8217;s tutorial. The idea is to have a simple composition of elements, an icon, a main title and a secondary title, that will be animated on hover using only CSS transitions and animations. We&#8217;ll be exploring some different effects for the elements.</p>
<p>The icons used in the demos are actually a <a href="http://www.justbenicestudio.com/studio/websymbols/" target="_blank">Web Symbols typeface</a> that we&#8217;ll include with @font-face. The typeface is done by the <a href="http://www.justbenicestudio.com/" target="_blank">Just Be Nice studio</a>.</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The Markup</h3>
<p>The HTML structure for the menu will be an unordered list where each item is a link element that consists of an icon span and a content div that will contain the main title and the secondary title:</p>
<pre class="brush:xml">
&lt;ul class="ca-menu"&gt;
	&lt;li&gt;
		&lt;a href="#"&gt;
			&lt;span class="ca-icon"&gt;A&lt;/span&gt;
			&lt;div class="ca-content"&gt;
				&lt;h2 class="ca-main"&gt;Exceptional Service&lt;/h2&gt;
				&lt;h3 class="ca-sub"&gt;Personalized to your needs&lt;/h3&gt;
			&lt;/div&gt;
		&lt;/a&gt;
	&lt;/li&gt;
	...
&lt;/ul&gt;
</pre>
<p>As we are using a symbol font for the icons, we write letters for the icons.</p>
<h3>The CSS</h3>
<p>The common style for all the examples will be the inclusion of the symbol typeface:</p>
<pre class="brush:css">
@font-face {
    font-family: 'WebSymbolsRegular';
    src: url('websymbols/websymbols-regular-webfont.eot');
    src: url('websymbols/websymbols-regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('websymbols/websymbols-regular-webfont.woff') format('woff'),
         url('websymbols/websymbols-regular-webfont.ttf') format('truetype'),
         url('websymbols/websymbols-regular-webfont.svg#WebSymbolsRegular') format('svg');
    font-weight: normal;
    font-style: normal;
}
</pre>
<p>The path of the files is relative to the CSS file, hence, they will be in the folder <em>css/websymbols/</em>.</p>
<p>The great advantage of having a font for the icons is that we can apply all those nice effects to it, for example a text shadow. We can also scale it to our needs. </p>
<p>The style for the unordered list will almost be the same for every example, we&#8217;ll just adapt the width of it, so that we can center it on the screen:</p>
<pre class="brush:css">
.ca-menu{
    padding: 0;
    margin: 20px auto;
    width: 500px;
}
</pre>
<p>In the following examples, I will show you the styling of the elements that will be subject to the effects.<br />
In the first example we&#8217;ll look at the styling of all elements and in the other example we&#8217;ll be focusing on the adaptions.</p>
<p><strong>Note:</strong> <em>In the following examples I will not write any browser specific prefixes because I don&#8217;t want to bloat the CSS, but you&#8217;ll find all the necessary prefixes in the demo files.</em></p>
<h4>Example 1</h4>
<p><a href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/index.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/CreativeCSS3Menu_Example1.jpg" alt="CreativeCSS3Menu_Example1" width="580" height="281" class="aligncenter size-full wp-image-6161" /></a></p>
<p>In this example we&#8217;ll have stacked menu where we will change the sizes of the elements and the background color of the whole item. </p>
<p>Let&#8217;s define the list item style:</p>
<pre class="brush:css">
.ca-menu li{
	width: 500px;
	height: 100px;
	overflow: hidden;
	display: block;
	background: #fff;
	box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
	margin-bottom: 4px;
	border-left: 10px solid #000;
	transition: all 300ms ease-in-out;
}
.ca-menu li:last-child{
    margin-bottom: 0px;
}
</pre>
<p>The transition will be for all properties since we&#8217;ll want to change the border color and the background color.</p>
<p>The link element will have the following style:</p>
<pre class="brush:css">
.ca-menu li a{
    text-align: left;
    display: block;
    width: 100%;
    height: 100%;
    color: #333;
    position:relative;
}
</pre>
<p>Let&#8217;s define the style for the single elements.<br />
The icon span will have the following style, placing it at the left side:</p>
<pre class="brush:css">
.ca-icon{
    font-family: 'WebSymbolsRegular', cursive;
    font-size: 20px;
    text-shadow: 0px 0px 1px #333;
    line-height: 90px;
    position: absolute;
    width: 90px;
    left: 20px;
    text-align: center;
    transition: all 300ms linear;
}
</pre>
<p>As you can see, we&#8217;ll use the web symbols as the font family. Each letter will be an icon.<br />
The wrapper for the content elements will have the following style:</p>
<pre class="brush:css">
.ca-content{
    position: absolute;
    left: 120px;
    width: 370px;
    height: 60px;
    top: 20px;
}
</pre>
<p>The content elements will vary in their font size and have a linear transition:</p>
<pre class="brush:css">
.ca-main{
    font-size: 30px;
    transition: all 300ms linear;
}
.ca-sub{
    font-size: 14px;
    color: #666;
    transition: all 300ms linear;
}
</pre>
<p>And now it comes the interesting part. On hover over the list element we will change the font sizes and the colors:</p>
<pre class="brush:css">
.ca-menu li:hover{
    border-color: #fff004;
    background: #000;
}
.ca-menu li:hover .ca-icon{
    color: #fff004;
    text-shadow: 0px 0px 1px #fff004;
    font-size: 50px;
}
.ca-menu li:hover .ca-main{
    color: #fff004;
    font-size: 14px;
}
.ca-menu li:hover .ca-sub{
    color: #fff;
    font-size: 30px;
}
</pre>
<p>Since we defined a transition for each of those elements, the change will be &#8220;animated&#8221;.</p>
<h4>Example 2</h4>
<p><a href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/index2.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/CreativeCSS3Menu_Example2.jpg" alt="CreativeCSS3Menu_Example2" width="580" height="289" class="aligncenter size-full wp-image-6162" /></a><br />
In the second example we&#8217;ll add some animations for the content elements. The idea is to animate them from the top and the bottom:</p>
<pre class="brush:css">
.ca-menu li:hover{
    background: #e1f0fa;
}
.ca-menu li:hover .ca-icon{
    font-size: 40px;
    color: #259add;
    opacity: 0.8;
    text-shadow: 0px 0px 13px #fff;
}
.ca-menu li:hover .ca-main{
    opacity: 1;
    color:#2676ac;
    animation: moveFromTop 300ms ease-in-out;
}
.ca-menu li:hover .ca-sub{
    opacity: 1;
    animation: moveFromBottom 300ms ease-in-out;
}
</pre>
<p>Let&#8217;s define the two animations. The first one will start from putting the respective element 200% down the Y Axis which means that it will be pushed down. Also, it will have an opacity of 0. Then it will animate to the origin by setting the translateY to 0%, basically saying we&#8217;ll go back to the point we were initially: </p>
<pre class="brush:css">
@keyframes moveFromBottom {
    from {
        opacity: 0;
        transform: translateY(200%);
    }
    to {
        opacity: 1;
        transform: translateY(0%);
    }
}
</pre>
<p>The second animation will move an element from the top with the same principles:</p>
<pre class="brush:css">
@keyframes moveFromTop {
    from {
        opacity: 0;
        transform: translateY(-200%);
    }
    to {
        opacity: 1;
        transform: translateY(0%);
    }
}
</pre>
<h4>Example 3</h4>
<p><a href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/index3.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/CreativeCSS3Menu_Example3.jpg" alt="CreativeCSS3Menu_Example3" width="580" height="275" class="aligncenter size-full wp-image-6163" /></a><br />
In this example we want to change the background and text color on hover. We will also rotate and enlarge the icon. That we can do with the transform property and by enlarging the font size of the icon:</p>
<pre class="brush:css">
.ca-menu li:hover{
    background-color: #000;
}
.ca-menu li:hover .ca-icon{
    color: #f900b0;
    font-size: 120px;
    opacity: 0.2;
    left: -20px;
    transform: rotate(20deg);
}
.ca-menu li:hover .ca-main{
    color: #f900b0;
    opacity: 0.8;
}
.ca-menu li:hover .ca-sub{
    color: #fff;
    opacity: 0.8;
}
</pre>
<h4>Example 4</h4>
<p><a href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/index4.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/CreativeCSS3Menu_Example4.jpg" alt="CreativeCSS3Menu_Example4" width="580" height="186" class="aligncenter size-full wp-image-6164" /></a><br />
Example 4 to example 8 will use a different layout for the menu. The items will be floating next to each other:</p>
<pre class="brush:css">
.ca-menu li{
    width: 200px;
    height: 300px;
    overflow: hidden;
    position: relative;
    float: left;
    border: 5px solid #fff;
    background: #e2f0ff;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    margin-right: 4px;
    transition: all 300ms linear;
}
.ca-menu li:last-child{
    margin-right: 0px;
}
</pre>
<p>The icon will be placed on the upper half in the center of the item:</p>
<pre class="brush:css">
.ca-icon{
    font-family: 'WebSymbolsRegular', cursive;
    color: #c5e4f4;
    font-size: 90px;
    text-shadow: 1px 0px 1px rgba(255,255,255,0.7);
    line-height: 150px;
    position: absolute;
    width: 100%;
    height: 50%;
    left: 0px;
    top: 0px;
    text-align: center;
    transition: all 200ms linear;
}
</pre>
<p>The content wrapper will be placed on the lower part of the item:</p>
<pre class="brush:css">
.ca-content{
    position: absolute;
    left: 0px;
    width: 100%;
    height: 50%;
    top: 50%;
}
</pre>
<p>The main title and the secondary title will have the following style:</p>
<pre class="brush:css">
.ca-main{
    font-size: 30px;
    color: #005382;
    opacity: 0.8;
    text-align: center;
    transition: all 200ms linear;
}
.ca-sub{
    text-align:center;
    font-size: 14px;
    color: #666;
    line-height: 40px;
    opacity: 0.8;
    transition: all 200ms linear;
}
</pre>
<p>On hover we want to blur the icon while we slide it from the top, change the background color and slide the content items from the top and bottom:</p>
<pre class="brush:css">
.ca-menu li:hover{
    background-color: #fff;
}
.ca-menu li:hover .ca-icon{
    text-shadow: 0px 0px 20px #c5e4f4;
    color: transparent;
    animation: moveFromTop 400ms ease;
}
.ca-menu li:hover .ca-main{
    color: #000;
    animation: moveFromTop 300ms ease;
}
.ca-menu li:hover .ca-sub{
    color: #000;
    animation: moveFromBottom 500ms ease;
}
</pre>
<p>The blurring of the icon happens when we set its color to transparent and give it a text shadow with a lot of fuzziness.<br />
The animations will be the same ones we used in one of the previous examples with the exception of the translate values for the moveFromTop animation. Here we will set the translateY to -300%.</p>
<h4>Example 5</h4>
<p><a href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/index5.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/CreativeCSS3Menu_Example5.jpg" alt="CreativeCSS3Menu_Example5" width="580" height="182" class="aligncenter size-full wp-image-6165" /></a><br />
In the fifth example we want to slide the icon in from the left, the title from the right and the secondary title from the bottom:</p>
<pre class="brush:css">
.ca-menu li:hover{
    background:#fff;
}
.ca-menu li:hover .ca-icon{
    color: #afa379;
    font-size: 90px;
    opacity: 0.1;
    animation: moveFromLeft 400ms ease;
}
.ca-menu li:hover .ca-main{
    color: #afa379;
    animation: moveFromRight 300ms ease;
}
.ca-menu li:hover .ca-sub{
    color: #000;
    animation: moveFromBottom 500ms ease;
}
</pre>
<p>The <strong>moveFromBottom</strong> animation we know already, let&#8217;s take a look at <strong>moveFromLeft</strong> that moves the respective element to the left by setting the translateX to -100% and then moves it back to its origin:</p>
<pre class="brush:css">
@keyframes moveFromLeft{
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0%);
    }
}
</pre>
<p>In the <strong>moveFromRight</strong> animation we&#8217;ll set it to translateX(100%) initially.</p>
<h4>Example 6</h4>
<p><a href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/index6.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/CreativeCSS3Menu_Example6.jpg" alt="CreativeCSS3Menu_Example6" width="580" height="178" class="aligncenter size-full wp-image-6166" /></a><br />
In this example we want to slide in the title from the left and also rotate it at the same time:</p>
<pre class="brush:css">
.ca-menu li:hover{
    background-color: #000;
}
.ca-menu li:hover .ca-icon{
    color: #fff;
    font-size: 90px;
}
.ca-menu li:hover .ca-main{
    color: #00ccff;
    animation: moveFromLeftRotate 300ms ease;
}
.ca-menu li:hover .ca-sub{
    color: #fff;
    animation: moveFromBottom 500ms ease;
}
</pre>
<p>The <strong>moveFromLeftRotate</strong> animation will move an item and rotate it:</p>
<pre class="brush:css">
@keyframes moveFromLeftRotate{
    from {
        transform: translateX(-100%) rotate(-90deg);
    }
    to {
        transform: translateX(0%) rotate(0deg);
    }
}
</pre>
<h4>Example 7</h4>
<p><a href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/index7.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/CreativeCSS3Menu_Example7.jpg" alt="CreativeCSS3Menu_Example7" width="580" height="180" class="aligncenter size-full wp-image-6167" /></a><br />
In this example, we&#8217;ll set the secondary title to be at the bottom of the item:</p>
<pre class="brush:css">
.ca-sub{
    text-align:center;
    font-size: 14px;
    color: #666;
    line-height: 40px;
    opacity: 0.8;
    position: absolute;
    bottom: 0;
    width: 100%;
    transition: all 200ms linear;
}
</pre>
<p>We want to slide it in from the bottom and change its background color.<br />
The icon will slide in from the bottom while the main title will appear to increase from small to big:</p>
<pre class="brush:css">
.ca-menu li:hover{
    background-color: #000;
}
.ca-menu li:hover .ca-icon{
    color: #ff2020;
    animation: moveFromBottom 300ms ease;
}
.ca-menu li:hover .ca-main{
    color: #ff2020;
    animation: smallToBig 300ms ease;
}
.ca-menu li:hover .ca-sub{
    color: #000;
    background-color: #ff2020;
    animation: moveFromBottom 500ms ease;
}
</pre>
<p>The <strong>smallToBig</strong> animation is an example on how to use the scale transfrom:</p>
<pre class="brush:css">
@keyframes smallToBig{
    from {
        transform: scale(0.1);
    }
    to {
        transform: scale(1);
    }
}
</pre>
<h4>Example 8</h4>
<p><a href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/index8.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/CreativeCSS3Menu_Example8.jpg" alt="CreativeCSS3Menu_Example8" width="580" height="200" class="aligncenter size-full wp-image-6168" /></a><br />
In this example, we want to enlarge the whole list item when hovering. We&#8217;ll do that by scaling it to 1.1.<br />
We also have a special icon span with the ID #heart. This span will be red and on hover we&#8217;ll use the <strong>smallToBig</strong> animation in a special way: we&#8217;ll alternate the animation infinitely creating a lovely heart-beat effect. </p>
<pre class="brush:css">
.ca-menu li:hover{
    background-color: #000;
    z-index:999;
    transform: scale(1.1);
}
.ca-menu li:hover .ca-icon{
    color: #ccff00;
    font-size: 90px;
    opacity:0.3;
}
.ca-menu li:hover .ca-icon#heart{
    animation: smallToBig 900ms alternate infinite ease;
}
.ca-menu li:hover .ca-main{
    color: #ccff00;
    animation: smallToBig 300ms ease;
}
.ca-menu li:hover .ca-sub{
    color: #ccff00;
    animation: moveFromBottom 500ms ease;
}
</pre>
<h4>Example 9</h4>
<p><a href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/index9.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/CreativeCSS3Menu_Example9.jpg" alt="CreativeCSS3Menu_Example9" width="580" height="161" class="aligncenter size-full wp-image-6169" /></a><br />
The last two examples will be circles, so we&#8217;ll change the style for the list elements:</p>
<pre class="brush:css">
.ca-menu li{
    width: 230px;
    height: 230px;
    border: 10px solid #f6f6f6;
    overflow: hidden;
    position: relative;
    float:left;
    background: #fff;
    margin-right: 4px;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    border-radius: 125px;
    transition: all 400ms linear;
}
</pre>
<p>In order to create a circle we need to set the border radius to half of the element&#8217;s outer width/height.<br />
Placing the elements in the list item absolutely and centering them, we&#8217;ll do the following on hover:</p>
<pre class="brush:css">
.ca-menu li:hover{
    background: #f7f7f7;
    border-color: #fff;
    transform: rotate(360deg);
}
.ca-menu li:hover .ca-icon{
    color: #555;
    font-size: 60px;
}
.ca-menu li:hover .ca-main{
    display: none;
}
.ca-menu li:hover .ca-sub{
    opacity: 0.8;
}
</pre>
<p>The item will be rotated 360 degrees and the main title will disappear, letting the secondary item appear (its opacity was initially set to 0).</p>
<h4>Example 10</h4>
<p><a href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/index10.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/CreativeCSS3Menu_Example10.jpg" alt="CreativeCSS3Menu_Example10" width="580" height="166" class="aligncenter size-full wp-image-6170" /></a><br />
In the last example, the list items are going to have a left margin of -48px. This will make overlap. Then on hover, we will scale them and increase the z-index, so that the hovered item stays on top:</p>
<pre class="brush:css">
.ca-menu li:hover{
    border-color: #333;
    z-index: 999;
    transform: scale(1.1);
}
.ca-menu li:hover .ca-icon{
    color: #000;
    font-size: 60px;
    text-shadow: 0px 0px 1px #000;
    animation: moveFromBottom 300ms ease;
}
.ca-menu li:hover .ca-main{
    color: #000;
    animation: moveFromBottom 500ms ease;
}
</pre>
<p>And that&#8217;s it! I hope you enjoyed these little experiments and find them inspiring and useful! </p>
<p><em>Please note that these animation and transitions will only work in the latest versions of truly modern web browsers, such as Google Chrome, Apple Safari and Mozilla Firefox.</em></p>
<p><a class="demo" href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/CreativeCSS3AnimationMenus.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/10/24/creative-css3-animation-menus/feed/</wfw:commentRss>
		<slash:comments>107</slash:comments>
		</item>
		<item>
		<title>Blur Menu with CSS3 Transitions</title>
		<link>http://tympanus.net/codrops/2011/10/19/blur-menu-with-css3-transitions/</link>
		<comments>http://tympanus.net/codrops/2011/10/19/blur-menu-with-css3-transitions/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 16:11:28 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[blur]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[text-shadow]]></category>
		<category><![CDATA[transition]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=6106</guid>
		<description><![CDATA[There are so many great things we can do with the additional properties and possibilities that CSS3 brings along. Today I want to show you how to experiment with text shadows and with transitions in order to achieve a blur effect that we'll apply to a menu on hovering over the elements. The main idea is to blur the other items while enhancing the one we are currently hovering.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Tutorials/BlurMenu/" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/BlurMenuwithCss3.jpg" alt="BlurMenuwithCss3" width="580" height="315" class="aligncenter size-full wp-image-6129" /></a></p>
<p><a class="demo" href="http://tympanus.net/Tutorials/BlurMenu/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/BlurMenu/BlurMenu.zip">Download source</a></p>
<p>There are so many great things we can do with the additional properties and possibilities that CSS3 brings along. Today I want to show you how to experiment with text shadows and with transitions in order to achieve a blur effect that we&#8217;ll apply to a menu on hovering over the elements. The main idea is to blur the other items while enhancing the one we are currently hovering.</p>
<p>The images in the demos are by fabulous Mark Sebastian and they are licensed under the <a href="http://creativecommons.org/licenses/by-sa/2.0/deed.en">Attribution-ShareAlike 2.0 Generic (CC BY-SA 2.0) License</a>. Visit <a href="http://www.flickr.com/photos/markjsebastian/" target="_blank">Mark&#8217;s Flickr Photostream</a> or <a href="http://www.markjsebastian.com/press_honor_roll_crew.html" target="_blank">his website</a> to discover some beautiful photography.</p>
<p><strong>Please note that this will only work properly in modern browsers</strong> and unfortunately Internet Explorer does not belong to that category yet since it does not support transitions (and many other suggested CSS3 properties that others do support). It also does not support text-shadows, so I&#8217;ve added a additional stylesheet for IE which will at least show the menu elements. </p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The Markup</h3>
<p>Let&#8217;s create the HTML structure for our menu first. We&#8217;ll add it to a container with a fixed width. The menu is going to look as follows:</p>
<pre class="brush:xml">
&lt;ul class="bmenu"&gt;
	&lt;li&gt;&lt;a href="#"&gt;About&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Illustrations&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Photography&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Web Design&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Personal Projects&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>Now we&#8217;ll add some style!</p>
<h3>The CSS</h3>
<p>In almost all of our examples we&#8217;ll have the same style for the ul and for the list elements. Just the link element will be modified. So, the common style for the unordered list is the following:</p>
<pre class="brush:css">
.bmenu{
    padding: 0px;
    margin: 0 0 10px 0;
    position: relative;
}
.bmenu li{
    font-size: 50px;
    display: block;
}
</pre>
<p>Now, let&#8217;s take a look at each of the seven examples.</p>
<h4>Example 1</h4>
<p><a href="http://tympanus.net/Tutorials/BlurMenu/index.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/BlurMenu_Style1.jpg"  alt="BlurMenu_Style1" width="580" height="293" class="aligncenter size-full wp-image-6111" /></a></p>
<p>In the first example we want to show the menu items slightly blurred initially. For that, we&#8217;ll give the link elements transparent color and a white text-shadow. We&#8217;ll also add the transitions for all properties:</p>
<pre class="brush:css">
.bmenu li a{
	color: transparent;
	display: block;
	text-transform: uppercase;
	text-shadow: 0px 0px 5px #fff;
	letter-spacing: 1px;
	-webkit-transition: all 0.3s ease-in-out;
	-moz-transition: all 0.3s ease-in-out;
	-o-transition: all 0.3s ease-in-out;
	-ms-transition: all 0.3s ease-in-out;
	transition: all 0.3s ease-in-out;
}
</pre>
<p>When hovering over a link element, we want it to become &#8220;clear&#8221; and all the others should become blurry. Now, we cannot say &#8220;on hover of a particular element do x to all the siblings&#8221; in CSS because the sibling selector is not really a sibling selector, it will just give you the next siblings in the HTML. </p>
<p>Anyway, we can do a little trick here. Since we have all our items nicely laid out as block elements, we can simply say, make everything blurry when we hover the whole menu (the unordered list) and then when hovering over a specific item we&#8217;ll crisp it up:</p>
<pre class="brush:css">
.bmenu:hover li a{
	text-shadow: 0px 0px 5px #0d1a3a;
}
.bmenu li a:hover{
	color: #fff;
	text-shadow: 0px 0px 1px #fff;
	padding-left: 10px;
}
</pre>
<p>By adding a padding left, we&#8217;ll animate the currently hovered item a bit to the right.</p>
<h4>Example 2</h4>
<p><a href="http://tympanus.net/Tutorials/BlurMenu/index2.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/BlurMenu_Style2.jpg"  alt="BlurMenu_Style2" width="580" height="296" class="aligncenter size-full wp-image-6112" /></a></p>
<p>In the second example, we&#8217;ll show the items in the menu a bit skewed initially. We&#8217;ll do that with the <a href="http://www.w3.org/TR/css3-2d-transforms/" target="_blank">2D transforms</a> property <strong>skew</strong>. The value will be -12 degrees which is the skewing angle along the x axis. The link s will have a semi-transparent background that we&#8217;ll achieve by using an rgba value. We&#8217;ll also add a slighty transparent text-shadow using rgba:</p>
<pre class="brush:css">
.bmenu li a{
	display: block;
	text-transform: uppercase;
	text-shadow: 1px 1px 2px rgba(89,22,20,0.3);
	color: #581514;
	padding: 5px 20px;
	margin: 2px;
	background: rgba(255,255,255,0.2);
	letter-spacing: 1px;
	-webkit-transform: skew(-12deg);
	-moz-transform: skew(-12deg);
	-o-transform: skew(-12deg);
	-ms-transform: skew(-12deg);
	transform: skew(-12deg);
	-webkit-transition: all 0.4s ease-in-out;
	-moz-transition: all 0.4s ease-in-out;
	-o-transition: all 0.4s ease-in-out;
	-ms-transition: all 0.4s ease-in-out;
	transition: all 0.4s ease-in-out;
}
</pre>
<p>Hovering over the menu, we&#8217;ll change the skew angle to 0 and make them appear blurry with a semi-transparent background. The currently hovered link will have no background:</p>
<pre class="brush:css">
.bmenu:hover li a{
	color: transparent;
	text-shadow: 0px 0px 10px #fff;
	background: rgba(88,22,22,0.2);
	-webkit-transform: skew(0deg);
	-moz-transform: skew(0deg);
	-o-transform: skew(0deg);
	-ms-transform: skew(0deg);
	transform: skew(0deg);
}
.bmenu li a:hover{
	background: transparent;
	text-shadow: 1px 1px 10px rgba(89,22,20,0.6);
	color: #581514;
}
</pre>
<h4>Example 3</h4>
<p><a href="http://tympanus.net/Tutorials/BlurMenu/index3.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/BlurMenu_Style3.jpg" alt="BlurMenu_Style3" width="580" height="292" class="aligncenter size-full wp-image-6113" /></a></p>
<p>In the third example we will play a bit with the sizes of the elements. We&#8217;ll initially scale them down and blur them. We&#8217;ll use a fairly slow linear transition:</p>
<pre class="brush:css">
.bmenu li a{
	white-space: nowrap;
	color: transparent;
	display: block;
	text-transform: uppercase;
	text-align: center;
	text-shadow: 0px 0px 6px #fff;
	letter-spacing: 1px;
	-moz-transform: scale(0.5);
	-ms-transform: scale(0.5);
	-o-transform: scale(0.5);
	-webkit-transform: scale(0.5);
	transform: scale(0.5);
	-webkit-transition: all 0.6s linear;
	-moz-transition: all 0.6s linear;
	-o-transition: all 0.6s linear;
	-ms-transition: all 0.6s linear;
	transition: all 0.6s linear;
}
</pre>
<p>Hovering over the menu, well blur the items even more and the currently hovered element will be sharpened up and scaled to the original size:</p>
<pre class="brush:css">
.bmenu:hover li a{
	text-shadow: 0px 0px 15px #fff;
}
.bmenu li a:hover{
	text-shadow: 0px 0px 1px #fff;
	-moz-transform: scale(1);
	-ms-transform: scale(1);
	-o-transform: scale(1);
	-webkit-transform: scale(1);
	transform: scale(1);
}
</pre>
<h4>Example 4</h4>
<p><a href="http://tympanus.net/Tutorials/BlurMenu/index4.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/BlurMenu_Style4.jpg" alt="BlurMenu_Style4" width="580" height="294" class="aligncenter size-full wp-image-6114" /></a><br />
In this variation, we&#8217;ll give the link elements a semi-transparent black background and a vibrant orange text color. We&#8217;ll use the linear <a href="http://www.w3.org/TR/css3-transitions/#transition-timing-function" target="_blank">timing transition</a> function here:</p>
<pre class="brush:css">
.bmenu li a{
	display: block;
	text-transform: uppercase;
	text-shadow: 0px 0px 2px #eeb213;
	color: #eeb213;
	padding: 5px 20px;
	margin: 2px;
	background: rgba(0,0,0,0.7);
	letter-spacing: 1px;
	-webkit-transition: all 0.2s linear;
	-moz-transition: all 0.2s linear;
	-o-transition: all 0.2s linear;
	-ms-transition: all 0.2s linear;
	transition: all 0.2s linear;
}
</pre>
<p>When we hover, we want the menu items to blur and and also to make their backgrounds more transparent. A single hovered item will become more opaque:</p>
<pre class="brush:css">
.bmenu:hover li a{
	text-shadow: 0px 0px 10px #eeb213;
	color: transparent;
	background: rgba(0,0,0,0.2);
}
.bmenu li a:hover{
	background: rgba(0,0,0,1.0);
	text-shadow: 0px 0px 1px #eeb213;
}
</pre>
<h4>Example 5</h4>
<p><a href="http://tympanus.net/Tutorials/BlurMenu/index5.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/BlurMenu_Style5.jpg" alt="BlurMenu_Style5" width="580" height="296" class="aligncenter size-full wp-image-6115" /></a><br />
The fifth example will be a subtle one: we&#8217;ll use only white for the text-shadows and font colors and just blur the elements slightly:</p>
<pre class="brush:css">
.bmenu li a{
	color: transparent;
	display: block;
	text-transform: uppercase;
	text-shadow: 0px 0px 4px #fff;
	letter-spacing: 1px;
	-webkit-transition: all 0.2s ease-in-out;
	-moz-transition: all 0.2s ease-in-out;
	-o-transition: all 0.2s ease-in-out;
	-ms-transition: all 0.2s ease-in-out;
	transition: all 0.2s ease-in-out;
}
</pre>
<p>On hover we&#8217;ll blur a little more and crisp up and move the currently hovered link element a bit:</p>
<pre class="brush:css">
.bmenu:hover li a{
	text-shadow: 0px 0px 6px #fff;
}
.bmenu li a:hover{
	color: #fff;
	text-shadow: 0px 0px 1px #fff;
	padding-left: 10px;
}
</pre>
<h4>Example 6</h4>
<p><a href="http://tympanus.net/Tutorials/BlurMenu/index6.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/BlurMenu_Style6.jpg" alt="" title="BlurMenu_Style6" width="580" height="296" class="aligncenter size-full wp-image-6116" /></a><br />
In this example we&#8217;ll give the elements a semi-transparent white background and leave them crisp initially:</p>
<pre class="brush:css">
.bmenu li a{
	white-space: nowrap;
	display: block;
	text-transform: uppercase;
	text-shadow: 1px 1px 2px rgba(71,80,23,0.3);
	color: #fff;
	padding: 5px 20px;
	margin: 2px;
	background: rgba(255,255,255,0.2);
	letter-spacing: 1px;
	-webkit-transition: all 0.4s ease-in-out;
	-moz-transition: all 0.4s ease-in-out;
	-o-transition: all 0.4s ease-in-out;
	-ms-transition: all 0.4s ease-in-out;
	transition: all 0.4s ease-in-out;
}
</pre>
<p>We want to give the first and last element some rounded borders so that the menu looks like a neat unit. We&#8217;ll target our desired elements with the <strong>first-child</strong> and <strong>last-child</strong> selectors:</p>
<pre class="brush:css">
.bmenu li:first-child a{
	-webkit-border-radius: 15px 15px 0px 0px;
	-moz-border-radius: 15px 15px 0px 0px;
	border-radius: 15px 15px 0px 0px;
}
.bmenu li:last-child a{
	-webkit-border-radius: 0px 0px 15px 15px;
	-moz-border-radius: 0px 0px 15px 15px;
	border-radius: 0px 0px 15px 15px;
}
</pre>
<p>On hover, we want the elements to look blurry and the currently hovered element to change colors and have a transparent background:</p>
<pre class="brush:css">
.bmenu:hover li a{
	text-shadow: 0px 0px 10px #fff;
	color: transparent;
}
.bmenu li a:hover{
	background: transparent;
	text-shadow: 1px 1px 10px rgba(71,80,23,0.6);
	color: #c4d85a;
}
</pre>
<h4>Example 7</h4>
<p><a href="http://tympanus.net/Tutorials/BlurMenu/index7.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/BlurMenu_Style7.jpg" alt="BlurMenu_Style7" width="580" height="286" class="aligncenter size-full wp-image-6117" /></a></p>
<p>In the last experiment we&#8217;ll make the whole menu look like a circle by adding a border radius with the value of half of the menus width/height:</p>
<pre class="brush:css">
.bmenu{
	padding: 50px 0px;
	margin: 0 auto;
	position: relative;
	background: rgba(0,0,0,0.7);
	width: 500px;
	height: 400px;
	-webkit-border-radius: 250px;
	-moz-border-radius: 250px;
	border-radius: 250px;
	-webkit-transition: background-color 0.5s ease-in-out;
	-moz-transition: background-color 0.5s ease-in-out;
	-o-transition: background-color 0.5s ease-in-out;
	-ms-transition: background-color 0.5s ease-in-out;
	transition: background-color 0.5s ease-in-out;
}
</pre>
<p>We&#8217;ll add the transitions here because we want to animate the background color when we enter into the menu. We&#8217;ll make it more transparent by using rgba values:</p>
<pre class="brush:css">
.bmenu:hover{
	background: rgba(0,0,0,0.2);
}
</pre>
<p>We&#8217;ll adjust the font size and the line height of the list element a bit:</p>
<pre class="brush:css">
.bmenu li{
	font-size: 40px;
	display: block;
	line-height: 66px;
}
</pre>
<p>The elements will be scaled down and blurred:</p>
<pre class="brush:css">
.bmenu li a{
	white-space: nowrap;
	color: transparent;
	display: block;
	text-align: center;
	text-transform: uppercase;
	text-shadow: 0px 0px 3px #fff;
	letter-spacing: 1px;
	-moz-transform: scale(0.8);
	-ms-transform: scale(0.8);
	-o-transform: scale(0.8);
	-webkit-transform: scale(0.8);
	transform: scale(0.8);
	-webkit-transition: all 0.4s linear;
	-moz-transition: all 0.4s linear;
	-o-transition: all 0.4s linear;
	-ms-transition: all 0.4s linear;
	transition: all 0.4s linear;
}
</pre>
<p>Hovering over the menu will also make the elements more blurry and give the currently hovered one a nice background color while crisping it up and scaling it to its original size:</p>
<pre class="brush:css">
.bmenu:hover li a{
	text-shadow: 0px 0px 10px #fff;
}
.bmenu li a:hover{
	text-shadow: none;
	color: #fff;
	background: rgba(129,6,29,0.8);
	-moz-transform: scale(1);
	-ms-transform: scale(1);
	-o-transform: scale(1);
	-webkit-transform: scale(1);
	transform: scale(1);
}
</pre>
<p>Remember, IE is the party pooper here, but if you&#8217;d like to try your luck and use IE&#8217;s proprietary shadows, check out the following resources and go wild:<br />
<a href="http://www.useragentman.com/blog/2011/04/23/css-blurred-text-shadow-in-ie-part-i/" target="_blank">CSS Blurred Text-Shadow in IE — Part I</a><br />
<a href="http://msdn.microsoft.com/en-us/library/ms673539%28VS.85%29.aspx" target="_blank">IE Visual Filters and Transitions Reference: Static Filters</a></p>
<p>And that&#8217;s it! What&#8217;s your favorite one? I hope you like these experiments and find them inspiring! </p>
<p><a class="demo" href="http://tympanus.net/Tutorials/BlurMenu/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/BlurMenu/BlurMenu.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/10/19/blur-menu-with-css3-transitions/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>Circle Navigation Effect with CSS3</title>
		<link>http://tympanus.net/codrops/2011/10/10/circle-navigation-effect-with-css3/</link>
		<comments>http://tympanus.net/codrops/2011/10/10/circle-navigation-effect-with-css3/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 22:23:46 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bubble]]></category>
		<category><![CDATA[circle]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[thumbnails]]></category>
		<category><![CDATA[transition]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=6029</guid>
		<description><![CDATA[Today we want to show you how to create a beautiful hover effect for an image navigation using CSS3. The idea is to expand a circular navigation with an arrow and make a bubble with a thumbnail appear. In our example we will be showing the thumbnail of the next and previous slider image on hovering the arrows. The effect is done with CSS3 transitions. ]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Tutorials/CircleNavigationEffect/" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/CircleNavigationEffect.jpg" alt="Circle Navigation Effect with CSS3" title="Circle Navigation Effect with CSS3" width="580" height="315" class="aligncenter size-full wp-image-6031" /></a><br />
<a class="demo" href="http://tympanus.net/Tutorials/CircleNavigationEffect/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/CircleNavigationEffect/CircleNavigationEffect.zip">Download source</a></p>
<p>Today we want to show you how to create a beautiful hover effect for an image navigation using CSS3. The idea is to expand a circular navigation with an arrow and make a bubble with a thumbnail appear. In our example we will be showing the thumbnail of the next and previous slider image on hovering the arrows. The effect is done with CSS3 transitions. </p>
<p>The beautiful images are by <a href="http://www.behance.net/AndrewLili" target="_blank">Andrey &#038; Lili</a> and they are licensed under the <a href="http://creativecommons.org/licenses/by-nc/3.0/" target="_blank">CC BY-NC 3.0</a> License.</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The Markup</h3>
<p>For this little CSS3 effect we will have a navigation structure that looks like the following:</p>
<pre class="brush:xml">
&lt;div class="cn-nav"&gt;
	&lt;a href="#" class="cn-nav-prev"&gt;
		&lt;span&gt;Previous&lt;/span&gt;
		&lt;div style="background-image:url(../images/thumbs/1.jpg);"&gt;&lt;/div&gt;
	&lt;/a&gt;
	&lt;a href="#" class="cn-nav-next"&gt;
		&lt;span&gt;Next&lt;/span&gt;
		&lt;div style="background-image:url(../images/thumbs/3.jpg);"&gt;&lt;/div&gt;
	&lt;/a&gt;
&lt;/div&gt;
</pre>
<p>In our demo we will make a jQuery template out of this and dynamically add the thumbnails for the previous and next images of the slider. But to show you how the expanding circle effect is done, we will only show you this part.</p>
<h3>The CSS</h3>
<p>Let&#8217;s see now, how to add the style for this navigation.<br />
Assuming that we have some relative surrounding container, we will set the link elements&#8217; position to absolute. The height and width will be 70 pixels so that we have a not too small area for the hover effect:</p>
<pre class="brush:css">
.cn-nav > a{
    position: absolute;
    top: 0px;
    height: 70px;
    width: 70px;
}
a.cn-nav-prev{
    left: 0px;
}
a.cn-nav-next{
    right: 0px;
}
</pre>
<p>The span element, which will contain the arrows as a background image will have an initial height and width of 46 pixel. In order to make it look like a circle, we need to set the border radius to half of its width/height. With the 50% and negative margin trick, we set it into the center of the link element. Then we define the transition which will take all properties into account with a duration of 400ms and with <strong>ease</strong> as the easing function:</p>
<pre class="brush:css">
.cn-nav a span{
    width: 46px;
    height: 46px;
    display: block;
    text-indent: -9000px;
    -moz-border-radius: 23px;
    -webkit-border-radius: 23px;
    border-radius: 23px;
    cursor: pointer;
    opacity: 0.9;
    position: absolute;
    top: 50%;
    left: 50%;
    background-size: 17px 25px;
    margin: -23px 0 0 -23px;
    -webkit-transition: all 0.4s ease;
	-moz-transition: all 0.4s ease;
	-o-transition: all 0.4s ease;
	-ms-transition: all 0.4s ease;
	transition: all 0.4s ease;
}
</pre>
<p>The spans&#8217; background image (righ and left arrow):</p>
<pre class="brush:css">
.cn-nav a.cn-nav-prev span{
    background: #666 url(../images/prev.png) no-repeat center center;
}
.cn-nav a.cn-nav-next span{
    background: #666 url(../images/next.png) no-repeat center center;
}
</pre>
<p>The div with the thumbnail as background image is initially going to have a height and width of 0 pixel. It&#8217;s going to be absolute and also positioned in the center of the link element. Border radius and margins are going to be 0 initially. The background image will fill all the element, hence we will give the background-size of 100% width and height. The transition for this element will be for all properties with a duration of 200ms and with the <strong>ease-out</strong> easing function:</p>
<pre class="brush:css">
.cn-nav a div{
    width: 0px;
    height: 0px;
    position: absolute;
    top: 50%;
    left: 50%;
    overflow: hidden;
    background-size: 100% 100%;
    background-position: center center;
    background-repeat: no-repeat;
    margin: 0px;
    -moz-border-radius: 0px;
    -webkit-border-radius: 0px;
    border-radius: 0px;
    -webkit-transition: all 0.2s ease-out;
	-moz-transition: all 0.2s ease-out;
	-o-transition: all 0.2s ease-out;
	-ms-transition: all 0.2s ease-out;
	transition: all 0.2s ease-out;
}
</pre>
<p>Now, let&#8217;s define what the elements will look like on hover. </p>
<p>The span will increase to 100 pixels in width and height and accordingly, we will set the negative margins and the border radius to half of that. We&#8217;ll increase the size of the background image a little bit. Additionally, we&#8217;ll change the background color and the opacity:</p>
<pre class="brush:css">
.cn-nav a:hover span{
    width: 100px;
    height: 100px;
    -moz-border-radius: 50px;
    -webkit-border-radius: 50px;
    border-radius: 50px;
    opacity: 0.6;
    margin: -50px 0 0 -50px;
    background-size: 22px 32px;
    background-color:#a8872d;
}
</pre>
<p>And finally, the little thumbnail div element will expand to 90 pixels, so that we can still see the span element around, appearing as a border to the thumb. We&#8217;ll also increase the background size a bit and set the negative margins and the border radius to half of the element&#8217;s width:</p>
<pre class="brush:css">
.cn-nav a:hover div{
    width: 90px;
    height: 90px;
    background-size: 120% 120%;
    margin: -45px 0 0 -45px;
    -moz-border-radius: 45px;
    -webkit-border-radius: 45px;
    border-radius: 45px;
}
</pre>
<p>And that&#8217;s it! A slick effect with CSS3 only! Check out the demo to see how it looks integrated in a slider with showing the previous and next thumbail (with a modern browser, sorry IE9 is not included)! I hope you enjoyed this little tutorial and find it useful.</p>
<p><a class="demo" href="http://tympanus.net/Tutorials/CircleNavigationEffect/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/CircleNavigationEffect/CircleNavigationEffect.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/10/10/circle-navigation-effect-with-css3/feed/</wfw:commentRss>
		<slash:comments>59</slash:comments>
		</item>
		<item>
		<title>Portfolio Image Navigation with jQuery</title>
		<link>http://tympanus.net/codrops/2011/08/09/portfolio-image-navigation/</link>
		<comments>http://tympanus.net/codrops/2011/08/09/portfolio-image-navigation/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 12:49:12 +0000</pubDate>
		<dc:creator>Marcin Dziewulski</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[portfolio]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=5458</guid>
		<description><![CDATA[Today we want to create a portfolio image navigation template with jQuery. The idea is to show some portfolio items in a grouped fashion and navigate through them in all 2D ways (horizontal/vertical). Either the arrows or the little boxes below the current image can be used in order to navigate.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Tutorials/PortfolioImageNavigation/" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/08/PortfolioImageNavigation.jpg" alt="" title="PortfolioImageNavigation" width="580" height="315" class="aligncenter size-full wp-image-5470" /></a><br />
<a class="demo" href="http://tympanus.net/Tutorials/PortfolioImageNavigation/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/PortfolioImageNavigation/PortfolioImageNavigation.zip">Download source</a></p>
<p>Today we want to create a portfolio image navigation template with jQuery. The idea is to show some portfolio items in a grouped fashion and navigate through them in all 2D ways (horizontal/vertical). Either the arrows or the little boxes below the current image can be used in order to navigate.</p>
<p>The beautiful photography is by Angelo González. Check out his <a href="http://www.flickr.com/photos/ag2r/" target="_blank">Flickr photostream</a> or follow him on Twitter <a href="http://twitter.com/ag2r" target="_blank">@ag2r</a>.</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The Markup</h3>
<p>For the markup, we&#8217;ll have a main wrapper div with the background, the arrows and the gallery containers inside:</p>
<pre class="brush:xml">
&lt;div id="portfolio"&gt;
	&lt;div id="background"&gt;&lt;/div&gt;
	&lt;div class="arrows"&gt;
		&lt;a href="#" class="up"&gt;Up&lt;/a&gt;
		&lt;a href="#" class="down"&gt;Down&lt;/a&gt;
		&lt;a href="#" class="prev"&gt;Previous&lt;/a&gt;
		&lt;a href="#" class="next"&gt;Next&lt;/a&gt;
	&lt;/div&gt;
	&lt;div class="gallery"&gt;
		&lt;div class="inside"&gt;
			&lt;div class="item"&gt;
				&lt;div&gt;&lt;img src="images/1.jpg" alt="image1" /&gt;&lt;/div&gt;
				&lt;div&gt;&lt;img src="images/2.jpg" alt="image2" /&gt;&lt;/div&gt;
				&lt;div&gt;&lt;img src="images/3.jpg" alt="image3" /&gt;&lt;/div&gt;
			&lt;/div&gt;
			&lt;div class="item"&gt;
				&lt;div&gt;&lt;img src="images/4.jpg" alt="image4" /&gt;&lt;/div&gt;
				&lt;div&gt;&lt;img src="images/5.jpg" alt="image5" /&gt;&lt;/div&gt;
			&lt;/div&gt;
			&lt;div class="item"&gt;
				&lt;div&gt;&lt;img src="images/6.jpg" alt="image6" /&gt;&lt;/div&gt;
				&lt;div&gt;&lt;img src="images/7.jpg" alt="image7" /&gt;&lt;/div&gt;
				...
			&lt;/div&gt;
			&lt;div class="item"&gt;
				...
			&lt;/div&gt;
		&lt;/div&gt;
	&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>Now, let&#8217;s take a look at the style.</p>
<h3>The CSS</h3>
<p>First, let&#8217;s define the style for the main container. We&#8217;ll set it&#8217;s position to be fixed and center it in the screen with the 50% and negative margin technique:</p>
<pre class="brush:css">
#portfolio {
	position:fixed;
	top:50%;
	left:50%;
	z-index:1;
	width:1000px;
	height:500px;
	margin:-250px 0 0 -500px;
}
</pre>
<p>The background will also be fixed and we&#8217;ll add a background image that creates the spotlight effect:</p>
<pre class="brush:css">
#background {
	position:fixed;
	top:0;
	left:0;
	width:100%;
	height:100%;
	z-index:2;
	background:url(../images/bg.png) no-repeat center;
}
</pre>
<p>The gallery will be positioned absolutely, just like it&#8217;s inner div:</p>
<pre class="brush:css">
#portfolio .gallery,
#portfolio .gallery .inside {
	position:absolute;
	top:0;
	left:0;
}
</pre>
<p>The gallery will also occupy all the space of the portfolio:</p>
<pre class="brush:css">
#portfolio .gallery {
	width:100%;
	height:100%;
	overflow:hidden;
}
</pre>
<p>We&#8217;ll fix the z-index of the inside div in order for keeping the stacking right:</p>
<pre class="brush:css">
#portfolio .gallery .inside {
	z-index:1;
}
</pre>
<p>Now, we&#8217;ll style the arrows. First, we&#8217;ll define the common style:</p>
<pre class="brush:css">
#portfolio .arrows a {
	position:absolute;
	z-index:3;
	width:32px;
	height:32px;
	background-image:url(../images/arrows.png);
	background-repeat:no-repeat;
	outline:none;
	text-indent:-9999px;
}
</pre>
<p>And then we&#8217;ll style all the single arrows:</p>
<pre class="brush:css">
#portfolio .arrows .prev,
#portfolio .arrows .up {
	display:none;
}

#portfolio .arrows .up,
#portfolio .arrows .down {
	left:50%;
	margin-left:-16px;
}

#portfolio .arrows .prev,
#portfolio .arrows .next {
	top:180px;
}

#portfolio .arrows .up {
	background-position:0 -64px;
	top:20px;
}

#portfolio .arrows .down {
	background-position:0 -96px;
	bottom:120px;
}

#portfolio .arrows .prev {
	background-position:0 -32px;
	left:60px;
}

#portfolio .arrows .next {
	background-position:0 0;
	right:60px;
}

#portfolio .arrows .up:hover {
	background-position:-32px -64px;
}

#portfolio .arrows .down:hover {
	background-position:-32px -96px;
}

#portfolio .arrows .next:hover {
	background-position:-32px 0;
}

#portfolio .arrows .prev:hover {
	background-position:-32px -32px;
}
</pre>
<p>The item divs, which are our wrappers for the image sets will be styled as follows:</p>
<pre class="brush:css">
#portfolio .item {
	position:absolute;
	top:0;
	width:1000px;
	height:400px;
}
</pre>
<p>Each image wrapper will be positioned absolutely, too and occupy all the space:</p>
<pre class="brush:css">
#portfolio .item div {
	position:absolute;
	left:0;
	width:100%;
	height:100%;
}
</pre>
<p>Each image will be centered. Keep in mind that in our example we are using images with a width of 600px, so if you use different ones, you need to adapt this:</p>
<pre class="brush:css">
#portfolio .item div img {
	position:absolute;
	top:0;
	left:50%;
	margin-left:-300px;
}
</pre>
<p>Let&#8217;s style the little boxes navigation which will be added dynamically:</p>
<pre class="brush:css">
#portfolio .paths {
	position:absolute;
	bottom:60px;
	left:50%;
	margin-left:-30px;
	z-index:4;
}

#portfolio .paths div {
	position:absolute;
	top:0;
}

#portfolio .paths a {
	background:#333;
	display:block;
	position:absolute;
	left:0;
	outline:none;
}

#portfolio .paths a:hover,
#portfolio .paths .active {
	background:#fff;
}
</pre>
<p>And that&#8217;s all the style!</p>
<h3>The JavaScript</h3>
<p>In this part, we&#8217;ll show you how to initialize the plugin.<br />
In the head of our HTML file, we will include the following three scripts:</p>
<pre class="brush:js">
&lt;script src="js/jquery.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="js/portfolio.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="js/init.js" type="text/javascript"&gt;&lt;/script&gt;
</pre>
<p>The first one is the jQuery library, the second one is our plugin and the third one is the initialization script:</p>
<pre class="brush:js">
var o = {
	init: function(){
		this.portfolio.init();
	},
	portfolio: {
		data: {
		},
		init: function(){
			$('#portfolio').portfolio(o.portfolio.data);
		}
	}
}

$(function(){ o.init(); });
</pre>
<p>The default option values for our plugin are the following:</p>
<pre class="brush:js">
$('#portfolio').portfolio({
	image: {
		width: 600,
		height: 400,
		margin: 20
	},
	path: {
		width: 10,
		height: 10,
		marginTop: 5,
		marginLeft: 5
	},
	animationSpeed: 400
});
</pre>
<p>The image options are the width, height and the margin between the images. The path options define the aspect of the little navigation boxes, how big they should be and how much margin they should have. Last, the animation speed can be adjusted.</p>
<p>Stay tuned for the next tutorial!</p>
<p><a class="demo" href="http://tympanus.net/Tutorials/PortfolioImageNavigation/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/PortfolioImageNavigation/PortfolioImageNavigation.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/08/09/portfolio-image-navigation/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>Animated Text and Icon Menu with jQuery</title>
		<link>http://tympanus.net/codrops/2011/07/12/animated-text-and-icon-menu/</link>
		<comments>http://tympanus.net/codrops/2011/07/12/animated-text-and-icon-menu/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 21:59:54 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[Navigation]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=5114</guid>
		<description><![CDATA[Today we want to show you how to create a slick menu with a nice animation feature on hover. The idea is to make some elements slide out, change and animate the background color of the item and then slide the elements back in with a different color. ]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://tympanus.net/Tutorials/AnimatedTextIconMenu/example1.html"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/07/AnimatedTextIconMenu.jpg" alt="" title="AnimatedTextIconMenu" width="580" height="315" class="aligncenter size-full wp-image-5124" /></a><br />
<a class="demo" href="http://tympanus.net/Tutorials/AnimatedTextIconMenu/example1.html" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/AnimatedTextIconMenu/AnimatedTextIconMenu.zip">Download source</a></p>
<p>Today we want to show you how to create a slick menu with a nice animation feature on hover. The idea is to make some elements slide out, change and animate the background color of the item and then slide the elements back in with a different color. </p>
<p>The inspiration for this menu comes from the website of the Pelican Miami Beach Hotel: <a href="http://www.pelicanhotel.com/" title="Pelican Hotel" target="_blank">http://www.pelicanhotel.com/</a></p>
<p>The icons are taken from the incredible Noun Project that &#8220;collects, organizes and adds to the highly recognizable symbols that form the world&#8217;s visual language, so we may share them in a fun and meaningful way&#8221;. Visit the website of <a href="http://thenounproject.com" title="The Noun Project" target="_blank">The Noun Project</a>.</p>
<p>So, let&#8217;s get started!</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The Markup</h3>
<p>Our HTML will be an unordered list where each list item will contain an anchor element with the three elements inside that we&#8217;ll animate:</p>
<pre class="brush:xml">
&lt;ul id="sti-menu" class="sti-menu"&gt;
	&lt;li data-hovercolor="#37c5e9"&gt;
		&lt;a href="#"&gt;
			&lt;h2 data-type="mText" class="sti-item"&gt;
				Some text
			&lt;/h2&gt;
			&lt;h3 data-type="sText" class="sti-item"&gt;
				Some more text
			&lt;/h3&gt;
			&lt;span data-type="icon" class="sti-icon sti-icon-care sti-item"&gt;
			&lt;/span&gt;
		&lt;/a&gt;
	&lt;/li&gt;
	&lt;li&gt;...&lt;/li&gt;
	...
&lt;/ul&gt;
</pre>
<p>The <code>data-hovercolor</code> will be used to set the color of the text on hover. Also, we&#8217;ll give some <code>data-type</code> attribute to each heading and the icon span. We&#8217;ll use that later in our JavaScript.</p>
<p>Now, let&#8217;s make it stylish!</p>
<h3>The CSS</h3>
<p>Remember, we always reset our CSS with a reset.css that we&#8217;ll add to our main style.<br />
First, we&#8217;ll style the unordered list and give it a fixed width so that we can center it on the page:</p>
<pre class="brush:css">
.sti-menu{
	width:1010px;
	position:relative;
	margin:60px auto 0 auto;
}
</pre>
<p>The list elements will be floating and a little margin:</p>
<pre class="brush:css">
.sti-menu li{
	float:left;
	width:200px;
	height:300px;
	margin:1px;
}
</pre>
<p>Now we&#8217;ll style the anchor. We&#8217;ll hide all the overflow because we want to animate the elements outside of the anchor:</p>
<pre class="brush:css">
.sti-menu li a{
	display:block;
	overflow:hidden;
	background:#fff;
	text-align:center;
	height:100%;
	width:100%;
	position:relative;
	-moz-box-shadow:1px 1px 2px #ddd;
	-webkit-box-shadow:1px 1px 2px #ddd;
	box-shadow:1px 1px 2px #ddd;
}
</pre>
<p>The headings will be positioned absolutely and we&#8217;ll define the width and the top position:</p>
<pre class="brush:css">
.sti-menu li a h2{
	color:#000;
	font-family: 'Wire One', arial, serif;
	font-size:42px;
	font-weight:bold;
	text-transform:uppercase;
	position:absolute;
	padding:10px;
	width:180px;
	top:140px;
	text-shadow: 0px 1px 1px black;
}
.sti-menu li a h3{
	font-family: Baskerville, "Hoefler Text", Garamond, "Times New Roman", serif;
	font-size:18px;
	font-style:italic;
	color: #111;
	position:absolute;
	top:248px;
	width:180px;
	padding:10px;
}
</pre>
<p>Each icon span will have the following general class and also a specific one, where we&#8217;ll add the right background image. The images will have both, the black and the colored version of the icon. We&#8217;ll change the background position in the JavaScript once we animate the icon out of the anchor element.</p>
<pre class="brush:css">
.sti-icon{
	width:100px;
	height:100px;
	position:absolute;
	background-position:top left;
	background-repeat:no-repeat;
	background-color:transparent;
	left:50px;
	top:30px;
}
.sti-icon-care{
	background-image:url(../images/care.png);
}
.sti-icon-alternative{
	background-image:url(../images/alternative.png);
}
.sti-icon-family{
	background-image:url(../images/family.png);
}
.sti-icon-info{
	background-image:url(../images/info.png);
}
.sti-icon-technology{
	background-image:url(../images/technology.png);
}
</pre>
<p>And that&#8217;s all the style! Let&#8217;s move to the fun part!</p>
<h3>The JavaScript</h3>
<p>Since we are doing a plugin out of this, let&#8217;s define the default settings first:</p>
<pre class="brush:js">
var settings = {
	// configuration for the mouseenter event
	animMouseenter		: {
		'mText' : {speed : 350, easing : 'easeOutExpo', delay : 140, dir : 1},
		'sText' : {speed : 350, easing : 'easeOutExpo', delay : 0, dir : 1},
		'icon'  : {speed : 350, easing : 'easeOutExpo', delay : 280, dir : 1}
	},
	// configuration for the mouseleave event
	animMouseleave		: {
		'mText' : {speed : 300, easing : 'easeInExpo', delay : 140, dir : 1},
		'sText' : {speed : 300, easing : 'easeInExpo', delay : 280, dir : 1},
		'icon'  : {speed : 300, easing : 'easeInExpo', delay : 0, dir : 1}
	},
	// speed for the item bg color animation
	boxAnimSpeed		: 300,
	// default text color (same defined in the css)
	defaultTextColor	: '#000',
	// default bg color (same defined in the css)
	defaultBgColor		: '#fff'
};
</pre>
<p>For each one of our elements we&#8217;ll have the animation speed, the easing effect, the delay time and the direction (1 is for up and 0 for down).<br />
We also have the animation speed for the background color animation of the menu item and the text and background color which we also have in our CSS.</p>
<pre class="brush:js">return this.each(function() {
	// if options exist, lets merge them with our default settings
	if ( options ) {
		$.extend( settings, options );
	}

	var $el 			= $(this),
		// the menu items
		$menuItems		= $el.children('li'),
		// save max delay time for mouseleave anim parameters
	maxdelay	= Math.max( settings.animMouseleave['mText'].speed + settings.animMouseleave['mText'].delay ,
							settings.animMouseleave['sText'].speed + settings.animMouseleave['sText'].delay ,
							settings.animMouseleave['icon'].speed + settings.animMouseleave['icon'].delay
						  ),
		// timeout for the mouseenter event
		// lets us move the mouse quickly over the items,
		// without triggering the mouseenter event
		t_mouseenter;

	// save default top values for the moving elements:
	// the elements that animate inside each menu item
	$menuItems.find('.sti-item').each(function() {
		var $el	= $(this);
		$el.data('deftop', $el.position().top);
	});

	// Events
	...

});
</pre>
<p>Let&#8217;s define the mouseenter event for each menu item:</p>
<pre class="brush:js">
$menuItems.bind('mouseenter', function(e) {

	clearTimeout(t_mouseenter);

	var $item		= $(this),
		$wrapper	= $item.children('a'),
		wrapper_h	= $wrapper.height(),
		// the elements that animate inside this menu item
		$movingItems= $wrapper.find('.sti-item'),
		// the color that the texts will have on hover
		hovercolor	= $item.data('hovercolor');

	t_mouseenter	= setTimeout(function() {
		// indicates the item is on hover state
		$item.addClass('sti-current');

		$movingItems.each(function(i) {
			var $item			= $(this),
				item_sti_type	= $item.data('type'),
				speed			= settings.animMouseenter[item_sti_type].speed,
				easing			= settings.animMouseenter[item_sti_type].easing,
				delay			= settings.animMouseenter[item_sti_type].delay,
				dir				= settings.animMouseenter[item_sti_type].dir,
				// if dir is 1 the item moves downwards
				// if -1 then upwards
				style			= {'top' : -dir * wrapper_h + 'px'};

			if( item_sti_type === 'icon' ) {
				// this sets another bg image position for the icon
				style.backgroundPosition	= 'bottom left';
			} else {
				style.color					= hovercolor;
			}
			// we hide the icon, move it up or down, and then show it
			$item.hide().css(style).show();
			clearTimeout($item.data('time_anim'));
			$item.data('time_anim',
				setTimeout(function() {
					// now animate each item to its default tops
					// each item will animate with a delay specified
					// in the options
					$item.stop(true)
						 .animate({top : $item.data('deftop') + 'px'}, speed, easing);
				}, delay)
			);
		});
		// animate the bg color of the item
		$wrapper.stop(true).animate({
			backgroundColor: settings.defaultTextColor
		}, settings.boxAnimSpeed );

	}, 100);	

})
</pre>
<p>And then we define the mouseleave event which is basically everything in reverse:</p>
<pre class="brush:js">
// mouseleave event for each menu item
.bind('mouseleave', function(e) {

	clearTimeout(t_mouseenter);

	var $item		= $(this),
		$wrapper	= $item.children('a'),
		wrapper_h	= $wrapper.height(),
		$movingItems= $wrapper.find('.sti-item');

	if(!$item.hasClass('sti-current'))
		return false;		

	$item.removeClass('sti-current');

	$movingItems.each(function(i) {
		var $item			= $(this),
			item_sti_type	= $item.data('type'),
			speed			= settings.animMouseleave[item_sti_type].speed,
			easing			= settings.animMouseleave[item_sti_type].easing,
			delay			= settings.animMouseleave[item_sti_type].delay,
			dir				= settings.animMouseleave[item_sti_type].dir;

		clearTimeout($item.data('time_anim'));

		setTimeout(function() {

			$item.stop(true).animate({'top' : -dir * wrapper_h + 'px'}, speed, easing, function() {

				if( delay + speed === maxdelay ) {

					$wrapper.stop(true).animate({
						backgroundColor: settings.defaultBgColor
					}, settings.boxAnimSpeed );

					$movingItems.each(function(i) {
						var $el				= $(this),
							style			= {'top' : $el.data('deftop') + 'px'};

						if( $el.data('type') === 'icon' ) {
							style.backgroundPosition	= 'top left';
						} else {
							style.color					= settings.defaultTextColor;
						}

						$el.hide().css(style).show();
					});

				}
			});
		}, delay);
	});
});
</pre>
<p>And that&#8217;s it! We hope you enjoyed this tutorial and find it useful!</p>
<p><a class="demo" href="http://tympanus.net/Tutorials/AnimatedTextIconMenu/example1.html" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/AnimatedTextIconMenu/AnimatedTextIconMenu.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/07/12/animated-text-and-icon-menu/feed/</wfw:commentRss>
		<slash:comments>71</slash:comments>
		</item>
		<item>
		<title>Sliding Background Image Menu with jQuery</title>
		<link>http://tympanus.net/codrops/2011/07/03/sliding-background-image-menu/</link>
		<comments>http://tympanus.net/codrops/2011/07/03/sliding-background-image-menu/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 17:36:34 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[background-image]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[sliding]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=4977</guid>
		<description><![CDATA[Today we want to share another jQuery menu with you. This menu will have several panels, each one corresponding to a different background image that will show on all panels when we hover over a panel label.  Also, a submenu will slide out from the bottom. This menu comes with some configuration possibilities, such as size of the image, the hover effect and custom default states.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example5.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/07/SlidingBackgroundImageMenu.jpg" alt="" title="SlidingBackgroundImageMenu" width="580" height="315" class="aligncenter size-full wp-image-4978" /></a><br />
<a class="demo" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example5.html" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/SlidingBackgroundImageMenu.zip">Download source</a><br />
Today we want to share another jQuery menu with you. This menu will have several panels, each one corresponding to a different background image that will show on all panels when we hover over a panel label.  Also, a submenu will slide out from the bottom. This menu comes with some configuration possibilities, such as the size of the image, the hover effect and custom default states.</p>
<p>The idea of this navigation is based on the <a target="_blank" href="http://tympanus.net/codrops/2010/05/05/beautiful-background-image-navigation-with-jquery/">Beautiful Background Image Navigation with jQuery</a>, a tutorial that had a similar effect. Since it was very popular and a lot of our readers asked for some very useful additions, we decided to revamp it and make it easier to customize.</p>
<p>The beautiful gastronomy photography is by Manoel Petry:<br />
<a target="_blank" href="http://www.flickr.com/people/manoelpetry/">Manoel Petry&#8217;s Flickr Photostream</a><br />
<a target="_blank" href="http://www.manoelpetry.com/">Manoel Petry&#8217;s Website</a><br />
The images are licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/">Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Generic License</a>.</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>Examples</h3>
<p>Take a look at all the examples (you can also navigate from them to all the other demos):</p>
<ul>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example1.html">Show/hide</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example2.html">Fade</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example3.html">Sequential fade</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example4.html">Side slide</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example4_1.html">Side slide (bounce)</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example5.html">Sequential slide</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example6.html">Up/down</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example7.html">Sequential up/down</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example8.html">Alternating up/down</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example8_1.html">Alternating up/down (2)</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example9.html">Sequential alternating up/down</a></li>
</ul>
<p>The HTML structure consists of the &#8220;sbi_container&#8221; which will have all the panels inside:</p>
<pre class="brush:xml">
&lt;div id="sbi_container" class="sbi_container"&gt;
	&lt;div class="sbi_panel" data-bg="images/1.jpg"&gt;
		&lt;a href="#" class="sbi_label"&gt;About&lt;/a&gt;
		&lt;div class="sbi_content"&gt;
			&lt;ul&gt;
				&lt;li&gt;&lt;a href="#"&gt;Subitem&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;&lt;a href="#"&gt;Subitem&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;&lt;a href="#"&gt;Subitem&lt;/a&gt;&lt;/li&gt;
			&lt;/ul&gt;
		&lt;/div&gt;
	&lt;/div&gt;
	&lt;div class="sbi_panel" data-bg="images/2.jpg"&gt;
		...
	&lt;/div&gt;
	...
&lt;/div&gt;
</pre>
<p>The &#8220;data-bg&#8221; attribute contains the path to the background image that will appear when hovering over the label of the respective panel.</p>
<p>Let&#8217;s take a look at an example for using the alternating vertical up/down sliding effect:</p>
<pre class="brush:js">
$('#sbi_container').bgImageMenu({
	defaultBg	: 'images/default.jpg',
	menuSpeed	: 300,
	border		: 1,
	type		: {
		mode		: 'verticalSlideAlt',
		speed		: 450,
		easing		: 'easeOutBack'
	}
});
</pre>
<p>The following parameters can be used/set:<br />
<strong>defaultBg:</strong> the default image shown when no label is hovered<br />
<strong>pos:</strong> if no defaultBg set, pos will indicate the panel that should be shown/open<br />
<strong>width:</strong> the width of the container and the images (they should all be of the same size)<br />
<strong>height:</strong> the height of the container and the images<br />
<strong>border:</strong> the width of the margin between the panels<br />
<strong>menuSpeed:</strong> the speed with which the menu should slide up</p>
<p><strong>mode:</strong> the type of animation; you can use def | fade | seqFade | horizontalSlide | seqHorizontalSlide | verticalSlide | seqVerticalSlide | verticalSlideAlt | seqVerticalSlideAlt<br />
<strong>speed:</strong> the speed of the panel animation<br />
<strong>easing:</strong> the easing effect for the animation<br />
<strong>seqfactor:</strong> delay between each item animation for seqFade | seqHorizontalSlide | seqVerticalSlide | seqVerticalSlideAlt </p>
<p>We hope you find this little menu interesting and useful, enjoy!</p>
<p><a class="demo" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example5.html" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/SlidingBackgroundImageMenu.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/07/03/sliding-background-image-menu/feed/</wfw:commentRss>
		<slash:comments>83</slash:comments>
		</item>
		<item>
		<title>Grid Navigation Effects with jQuery</title>
		<link>http://tympanus.net/codrops/2011/06/09/grid-navigation-effects/</link>
		<comments>http://tympanus.net/codrops/2011/06/09/grid-navigation-effects/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 13:35:46 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[thumbnails]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=4787</guid>
		<description><![CDATA[Today we want to share some neat grid navigation effects using jQuery. In our examples we will show you ten ways how to navigate through a set of thumbnails. We'll take a look at some of the possibilities and how to apply the effect. ]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Development/GridNavigationEffects/example5.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/06/GridNavigationEffects.jpg" alt="" title="GridNavigationEffects" width="580" height="315" class="aligncenter size-full wp-image-4789" /><br />
</a><br />
<a class="demo" href="http://tympanus.net/Development/GridNavigationEffects/example5.html" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Development/GridNavigationEffects/GridNavigationEffects.zip">Download source</a></p>
<p>Today we want to share some neat grid navigation effects using jQuery. In our examples we will show you ten ways how to navigate through a set of thumbnails. We&#8217;ll take a look at some of the possibilities and how to apply the effect. </p>
<p>The images used in the demos are by Andrew and Lili and you can see their Behance profile here:<br />
<a target="_blank" href="http://www.behance.net/AndrewLili">http://www.behance.net/AndrewLili</a><br />
The images are licensed under the <a target="_blank" href="http://creativecommons.org/licenses/by-nc/3.0/">Creative Commons Attribution-NonCommercial 3.0 Unported License</a>.</p>
<p>Take a look at all the examples (you can also navigate from them to all the other examples):</p>
<ul>
<li><a target="_blank" href="http://tympanus.net/Development/GridNavigationEffects/example1.html">Default (show/hide)</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/GridNavigationEffects/example2.html">Fade</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/GridNavigationEffects/example3.html">Sequential fade</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/GridNavigationEffects/example4.html">Move/fade</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/GridNavigationEffects/example5.html">Sequential move/fade</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/GridNavigationEffects/example6.html">Sequential move/fade reversed</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/GridNavigationEffects/example7.html">Resize (show/hide)</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/GridNavigationEffects/example8.html">Disperse</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/GridNavigationEffects/example9.html">Rows move</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/GridNavigationEffects/example10.html">Sequential move/fade (3 rows)</a></li>
</ul>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<p>You can use the mousewheel to navigate through the thumbnails.</p>
<p>The HTML structure that the script is based on is basically a list of element and some navigation arrows wrapped by a container with class and id &#8220;tj_container&#8221;.</p>
<p>Let&#8217;s see an example for using the sequential move/fade:</p>
<pre class="brush:js">
$('#tj_container').gridnav({
	rows	: 2,
	navL	: '#tj_prev',
	navR	: '#tj_next',
	type	: {
		mode		: 'sequpdown',
		speed		: 400,
		easing		: '',
		factor		: 50,
		reverse		: false
	}
});
</pre>
<p>The following parameters can be used/set:<br />
<strong>rows:</strong> the number of rows to be shown in the grid<br />
<strong>navL/navR:</strong> the selectors for the previous and next navigation elements<br />
<strong>mode:</strong> the type of animation; you can use def | fade | seqfade | updown | sequpdown | showhide | disperse | rows<br />
<strong>speed:</strong> the speed of the animation for fade, seqfade, updown, sequpdown, showhide, disperse, rows<br />
<strong>easing:</strong> the easing effect for fade, seqfade, updown, sequpdown, showhide, disperse, rows<br />
<strong>factor:</strong> delay between each item animation for seqfade, sequpdown; amount of pixels the row move when using rows<br />
<strong>reverse:</strong> for reversing the order when using sequpdown</p>
<p>We hope you like these little effects and find them useful! </p>
<p><a class="demo" href="http://tympanus.net/Development/GridNavigationEffects/example5.html" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Development/GridNavigationEffects/GridNavigationEffects.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/06/09/grid-navigation-effects/feed/</wfw:commentRss>
		<slash:comments>71</slash:comments>
		</item>
		<item>
		<title>Sliding Letters with jQuery</title>
		<link>http://tympanus.net/codrops/2011/05/09/sliding-letters-with-jquery/</link>
		<comments>http://tympanus.net/codrops/2011/05/09/sliding-letters-with-jquery/#comments</comments>
		<pubDate>Mon, 09 May 2011 10:40:08 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[letters]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[sliding]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=4720</guid>
		<description><![CDATA[Today we have a neat little effect for you. We want to bring some life to the standard hover effect by playing around with the letters in an anchor word. The aim is to slide in letter by letter when hovering over a link element. We can either have the same word or a different [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://tympanus.net/Development/SlidingLetters/"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/05/slidingLetters.jpg" alt="" title="slidingLetters" width="580" height="315" class="aligncenter size-full wp-image-4721" /></a></p>
<p>Today we have a neat little effect for you. We want to bring some life to the standard hover effect by playing around with the letters in an anchor word. The aim is to slide in letter by letter when hovering over a link element. We can either have the same word or a different one and we can slide in the new letters all the same time or one after the other. </p>
<p>We will be using the <a target="_blank" href="http://letteringjs.com/">Lettering.js jQuery Plugin</a> which you can find on <a target="_blank" href="https://github.com/davatron5000/Lettering.js">Github</a>.</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>Example</h3>
<p>In the following we will go through an example and we&#8217;ll start by the html for a little menu:</p>
<pre class="brush:xml">
&lt;div class="sl_examples"&gt;
	&lt;a href="#" id="example1" data-hover="Creativity"&gt;Illustrations&lt;/a&gt;
&lt;/div&gt;
</pre>
<p>We will use data-hover to indicate the word that should appear on hover. If you don&#8217;t use the data-hover then the same word will be used on hover.<br />
Then we will style it in the following way, making sure that we have the right properties for the structure that will be generated:</p>
<pre class="brush:css">
.sl_examples{
	float:left;
	font-family: 'Bevan', arial, serif;
	font-size:50px;
	line-height:50px;
	color:#f0f0f0;
	margin-right:5px;
	text-transform:uppercase;
}
.sl_examples a{
	display:block;
	position:relative;
	float:left;
	clear:both;
	color:#fff;
}
.sl_examples a > span{
	height:50px;
	float:left;
	position:relative;
	overflow:hidden;
}
.sl_examples a span span{
	position:absolute;
	display:block;
	left:0px;
	top:0px;
	text-align:center;
}
.sl_examples a span span.sl-w1{
	color:#fff;
	text-shadow:0px 0px 1px #fff;
	z-index:2;
}
.sl_examples a span span.sl-w2{
	color:#e82760;
	text-shadow:-1px 1px 2px #9f0633;
	z-index:3;
}
</pre>
<p>So, &#8220;sl-w1&#8243; is the class for the first word letters and &#8220;sl-w2&#8243; is the class for the second word letters.</p>
<p>Finally, we call the plugin:</p>
<pre class="brush:js">
$(window).load(function(){
	$('#example1').hoverwords({ delay:50 });
});
</pre>
<p>The following settings can be used:</p>
<pre class="brush:js">
delay		: false,		// each letter will have different animation times
speed		: 300,			// animation speed
easing		: 'jswing',		// easing animation
dir			: 'leftright', 	// leftright - current goes left, new one goes right || rightleft - current goes right, new one goes left,
overlay		: false,		// hover word is slided on top of the current word (just for the case when the hover word equals word)
opacity		: true			// animate the letters opacity
</pre>
<p>We hope you liked this little experiment and find it useful!</p>
<p><a class="demo" href="http://tympanus.net/Development/SlidingLetters/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Development/SlidingLetters/SlidingLetters.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/05/09/sliding-letters-with-jquery/feed/</wfw:commentRss>
		<slash:comments>61</slash:comments>
		</item>
		<item>
		<title>Moving Boxes Content with jQuery</title>
		<link>http://tympanus.net/codrops/2011/03/28/moving-boxes-content/</link>
		<comments>http://tympanus.net/codrops/2011/03/28/moving-boxes-content/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 12:34:00 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[boxes]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=4586</guid>
		<description><![CDATA[View demoDownload source Today we will create a website template with some really sweet animations using jQuery. The idea is to have little boxes scattered around at the top of the site and when a menu item is clicked, the boxes animate to form the main content area. We will use some different animation effects [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Tutorials/MovingBoxesContent/" target="blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/03/movingboxes.jpg" alt="" title="movingboxes" width="580" height="315" class="aligncenter size-full wp-image-4596" /></a><br />
<a class="demo" href="http://tympanus.net/Tutorials/MovingBoxesContent/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/MovingBoxesContent/MovingBoxesContent.zip">Download source</a><br />
Today we will create a website template with some really sweet animations using jQuery. The idea is to have little boxes scattered around at the top of the site and when a menu item is clicked, the boxes animate to form the main content area. We will use some different animation effects that we will add as options to the menu item. </p>
<p>The content area will custom scroll for which we will be using the really awesome <a href="http://jscrollpane.kelvinluck.com/" target="_blank">jScrollPane Plugin by Kevin Luck</a>. We will also use the <a href="https://github.com/heygrady/transform" target="_blank">jQuery 2d transformation plugin by Grady</a> in order to rotate the little boxes while we animate them, and the the <a href="http://gsgd.co.uk/sandbox/jquery/easing/" target="_blank">jQuery Easing Plugin</a> for some spice.</p>
<p>The beautiful photos are by Jin. Visit his Flickr photostream at <a href="http://www.flickr.com/photos/jinthai/" target="_blank">http://www.flickr.com/photos/jinthai/</a></p>
<p>So, let&#8217;s start!</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The Markup</h3>
<p>First, we want to place the background image with the grid overlay:</p>
<pre class="brush:xml">
&lt;div id="mb_background" class="mb_background"&gt;
	&lt;img class="mb_bgimage" src="images/default.jpg" alt="Background"/&gt;
	&lt;div class="mb_overlay"&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>The next div element will be used to add the little boxes with their random position and rotation degree</p>
<pre class="brush:xml">
&lt;div id="mb_pattern" class="mb_pattern"&gt;&lt;/div&gt;
</pre>
<p>We will place a total of 16 boxes (div elements) into this container.<br />
The menu and the heading will have the following HTML stucture:</p>
<pre class="brush:xml">
&lt;div class="mb_heading"&gt;
	&lt;h1&gt;Lack of Color&lt;/h1&gt;
&lt;/div&gt;

&lt;div id="mb_menu" class="mb_menu"&gt;
	&lt;a href="#" data-speed="600" data-easing="easeOutBack"&gt;About&lt;/a&gt;
	&lt;a href="#" data-speed="1000" data-easing="easeInExpo"&gt;Work&lt;/a&gt;
	&lt;a href="#" data-speed="600" data-easing="easeOutBack"&gt;Media&lt;/a&gt;
	&lt;a href="#" data-speed="1000" data-easing="easeInExpo"&gt;Contact&lt;/a&gt;
&lt;/div&gt;
</pre>
<p>As you can see, we will add two &#8220;data-&#8221; attributes that we&#8217;ll use to define the speed and the easing effect that will be associated to the animation of the boxes. Read more about these new custom data attributes of HTML5 on John Resig&#8217;s blog: <a href="http://ejohn.org/blog/html-5-data-attributes/" target="_blank">HTML 5 data- Attributes</a><br />
Next, we will define the structure for the content area. There will be a main wrapper with the class &#8220;mb_content_wrapper&#8221; which contains all the content containers that have the class &#8220;mb_content&#8221; and a span for the closing cross:</p>
<pre class="brush:xml">
&lt;div id="mb_content_wrapper" class="mb_content_wrapper"&gt;
	&lt;span class="mb_close"&gt;&lt;/span&gt;
	&lt;div class="mb_content"&gt;
		&lt;h2&gt;About&lt;/h2&gt;
		&lt;div class="mb_content_inner"&gt;
			&lt;p&gt;Some text...&lt;/p&gt;
		&lt;/div&gt;
	&lt;/div&gt;
	&lt;div class="mb_content"&gt;
		...
	&lt;/div&gt;
	&lt;div class="mb_content"&gt;
		...
	&lt;/div&gt;
	&lt;div class="mb_content"&gt;
		...
	&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>One of the content elements is going to contain a list of images:</p>
<pre class="brush:xml">
&lt;div class="mb_content_inner"&gt;
	&lt;p&gt;...&lt;/p&gt;
	&lt;ul id="mb_imagelist" class="mb_imagelist"&gt;
		&lt;li&gt;&lt;img src="images/small/1.jpg" alt="image1" data-bgimg="images/image1.jpg"/&gt;&lt;/li&gt;
		&lt;li&gt;&lt;img src="images/small/2.jpg" alt="image2" data-bgimg="images/image2.jpg"/&gt;&lt;/li&gt;
		&lt;li&gt;...&lt;/li&gt;
	&lt;/ul&gt;
	&lt;p&gt;...&lt;/p&gt;
&lt;/div&gt;
</pre>
<p>And that&#8217;s all the HTML. Now, let&#8217;s make it pretty!</p>
<h3>The CSS</h3>
<p>First, we will embed our reset.css that will reset all the basic styles, and we&#8217;ll define some main properties:</p>
<pre class="brush:css">
@import url('reset.css');

body{
	background:#000;
	color:#fff;
	font-family: 'PT Sans Narrow', Arial, sans-serif;
}
a{
	color:#fff;
	text-decoration:none;
}
</pre>
<p>Next, we will define the styles for the image that we will use as a background and the overlay pattern:</p>
<pre class="brush:css">
img.mb_bgimage{
	position:fixed;
	left:0px;
	top:0px;
	width:100%;
	opacity:0.8;
	z-index:1;
}
.mb_overlay{
	width:100%;
	height:100%;
	position:fixed;
	top:0px;
	left:0px;
	background:transparent url(../images/pattern.png) repeat top left;
	z-index:2;
}
</pre>
<p>They will both be of fixed positioning and we will give them a low z-index so that they really stay under everything else.</p>
<p>The little boxes will all have a height and width of 50 pixel and they will have absolute positioning:</p>
<pre class="brush:css">
.mb_pattern div{
	position:absolute;
	width:50px;
	height:50px;
	background:#000;
	z-index:10;
}
</pre>
<p>The main heading will also be positioned absolutely and we will use a font-face from the collection of Google Web Fonts:</p>
<pre class="brush:css">
.mb_heading h1{
	position:absolute;
	top:10px;
	left:10px;
	font-size:86px;
	color:#000;
	text-shadow:0px 0px 1px #fff;
	font-family:"Astloch", Arial, sans-serif;
	z-index:4;
}
</pre>
<p>The menu container will be placed absolutely to the left side of the screen:</p>
<pre class="brush:css">
.mb_menu{
	position:absolute;
	top:154px;
	left:0px;
	z-index:11;
}
</pre>
<p>The link elements inside of the menu container will be black boxes with a neat transition on hover:</p>
<pre class="brush:css">
.mb_menu a{
	background-color:#000;
	margin-bottom:2px;
	opacity:0.9;
	display:block;
	width:98px;
	height:98px;
	color:#fff;
	line-height:98px;
	text-align:center;
	text-transform:uppercase;
	outline:none;
	-webkit-transition: all 0.2s ease-in;
	-moz-transition:all 0.2s ease-in;
	-o-transition: all 0.2s ease-in;
	-transition: all 0.2s ease-in;
}
.mb_menu a:hover{
	color:#000;
	background-color:#fff;
}
</pre>
<p>Read more about transitions in the W3 working draft at <a href="http://www.w3.org/TR/css3-transitions/" target="_blank">http://www.w3.org/TR/css3-transitions/</a> or in this great article on A List Apart by Dan Cederholm: <a href="http://www.alistapart.com/articles/understanding-css3-transitions/">Understanding CSS3 Transitions</a>.</p>
<p>Next step is to style the content wrapper. We will give it a fixed width and height and a semi-transparent dark background. We&#8217;ll hide it initially:</p>
<pre class="brush:css">
.mb_content_wrapper{
	background:transparent url(../images/bg_menu.png) repeat top left;
	width:400px;
	height:400px;
	position:absolute;
	top:154px;
	left:200px;
	z-index:4;
	display:none;
}
</pre>
<p>Why don&#8217;t we just use opacity instead of a repeated background image? In some browsers all child elements will inherit that opacity level and we cannot set it higher for them. So, if we really want the inner elements to be completely opaque, it&#8217;s safer to use a background image for the surrounding container.</p>
<p>The little closing span will have the following style:</p>
<pre class="brush:css">
span.mb_close{
	position:absolute;
	top:10px;
	right:10px;
	width:11px;
	height:12px;
	cursor:pointer;
	background:transparent url(../images/close.png) no-repeat top left;
	opacity:0.8;
}
span.mb_close:hover{
	opacity:1.0;
}
</pre>
<p>The content area is going to have some padding and we&#8217;ll hide it:</p>
<pre class="brush:css">
.mb_content{
	padding:30px;
	display:none;
}
</pre>
<p>The heading will have some background image for the stripe underline:</p>
<pre class="brush:css">
.mb_content h2{
	font-family:"Astloch";
	text-shadow:0px 0px 1px #fff;
	font-size:42px;
	background:transparent url(../images/line.png) repeat-x bottom left;
	padding:0px 0px 5px 0px;
	margin-bottom:10px;
}
</pre>
<p>The following container is for the resting content and it will be this element that we will apply the custom scrollbar to: </p>
<pre class="brush:css">
.mb_content_inner{
	line-height:24px;
	height:268px;
	outline: none;
}
.mb_content_inner p{
	padding:5px 0px;
}
</pre>
<p>For the thumbnail list in the &#8220;Work&#8221; section, we will have the following style:</p>
<pre class="brush:css">
ul.mb_imagelist li{
	float:left;
	margin:2px;
	cursor:pointer;
}
ul.mb_imagelist li img{
	display:block;
	opacity:0.3;
	-webkit-transition: all 0.5s ease-in-out;
	-moz-transition: all 0.5s ease-in-out;
	-o-transition: all 0.5s ease-in-out;
	-transition: all 0.5s ease-in-out;
}
ul.mb_imagelist li img:hover{
	opacity:1.0;
}
</pre>
<p>As you can see, we will add some transition to it, making the thumbnail become opaque smoothly.</p>
<p>And that&#8217;s all the main style. (You can check out the styling for the form and the footer in the style.css file.)</p>
<p>Let&#8217;s add some brio to the whole thing!</p>
<h3>The JavaScript</h3>
<p>So the main idea is to create those little boxes and scatter them around a restricted area and rotate them. When we click on a menu item, we&#8217;ll make those boxes animate to a certain position and form the main content container. Then we&#8217;ll show the container and the respective content. When clicking on the closing span, we want to make the boxes disperse again.<br />
In the &#8220;Works&#8221; content, we will have some thumbnails that will show a background image when clicking on them. </p>
<p>So, let&#8217;s start by caching some elements:</p>
<pre class="brush:js">
var $menu				= $('#mb_menu'),
	$menuItems			= $menu.children('a'),
	$mbWrapper			= $('#mb_content_wrapper'),
	$mbClose			= $mbWrapper.children('.mb_close'),
	$mbContentItems		= $mbWrapper.children('.mb_content'),
	$mbContentInnerItems= $mbContentItems.children('.mb_content_inner');
	$mbPattern			= $('#mb_pattern'),
	$works				= $('#mb_imagelist > li'),
	$mb_bgimage			= $('#mb_background > img'),
</pre>
<p>Next, we will define the &#8220;Menu&#8221; function:</p>
<pre class="brush:js">
Menu		 		= (function(){
  ...
})();

/*
call the init method of Menu
 */
Menu.init();
</pre>
<p>So, inside of our &#8220;Menu&#8221; function, we&#8217;ll define our main functionality, starting with a method to initialize the whole thing:</p>
<pre class="brush:js">
var init			= function() {
	preloadImages();
	initPlugins();
	initPattern();
	initEventsHandler();
},
</pre>
<p>We want to preload the images that we have in the &#8220;Work&#8221; content. The data attribute in the thumbnails tells us, which images we need:</p>
<pre class="brush:js">
preloadImages		= function() {
	$works.each(function(i) {
		$('<img/>').attr('src' , $(this).children('img').data('bgimg'));
	});
},
</pre>
<p>The jScollPane plugin needs to be initialized, and we&#8217;ll apply the custom scroll to the inner content area of the content div when we call this:</p>
<pre class="brush:js">
initPlugins			= function() {
	$mbContentInnerItems.jScrollPane({
		verticalDragMinHeight: 40,
		verticalDragMaxHeight: 40
	});
},
</pre>
<p>&#8220;initPattern&#8221; will randomly place 16 boxes (div elements) into a restricted area. We restrict that area by restricting the top and left values to a certain range:</p>
<pre class="brush:js">
initPattern			= function() {
	for(var i = 0; i < 16 ; ++i) {
		//opacity, random top, left and angle
		var o		= 0.1,
		t		= Math.floor(Math.random()*196) + 5, // between 5 and 200
		l		= Math.floor(Math.random()*696) + 5, // between 5 and 700
		a		= Math.floor(Math.random()*101) - 50; // between -50 and 50

		$el		= $('
<div>').css({
			opacity			: o,
			top				: t + 'px',
			left			: l + 'px'
		});

		if (!$.browser.msie)
			$el.transform({'rotate'	: a + 'deg'});

		$el.appendTo($mbPattern);
	}
	$mbPattern.children().draggable(); //just for fun
},
</pre>
<p>When we close the content area we want to move the little boxes back, scattered around randomly again:</p>
<pre class="brush:js">
disperse			= function() {
	$mbPattern.children().each(function(i) {
		var o			= 0.1,
		t			= Math.floor(Math.random()*196) + 5,
		l			= Math.floor(Math.random()*696) + 5,
		a			= Math.floor(Math.random()*101) - 50;
		$el			= $(this),
		param		= {
			width	: '50px',
			height	: '50px',
			opacity	: o,
			top		: t + 'px',
			left	: l + 'px'
		};

		if (!$.browser.msie)
			param.rotate	= a + 'deg';

		$el.animate(param, 1000, 'easeOutExpo');
	});
},
</pre>
<p>Let&#8217;s handle the events:</p>
<pre class="brush:js">
initEventsHandler		= function() {
	/*
		click a link in the menu
	 */
	$menuItems.bind('click', function(e) {
		var $this	= $(this),
		pos		= $this.index(),
		speed	= $this.data('speed'),
		easing	= $this.data('easing');
		//if an item is not yet shown
		if(!$menu.data('open')){
			//if current animating return
			if($menu.data('moving')) return false;
			$menu.data('moving', true);
			$.when(openItem(pos, speed, easing)).done(function(){
				$menu.data({
					open	: true,
					moving	: false
				});
				showContentItem(pos);
				$mbPattern.children().fadeOut(500);
			});
		}
		else
			showContentItem(pos);
		return false;
	});

	/*
		click close makes the boxes animate to the top of the page
	 */
	$mbClose.bind('click', function(e) {
		$menu.data('open', false);
		/*
			if we would want to show the default image when we close:
			changeBGImage('images/default.jpg');
		 */
		$mbPattern.children().fadeIn(500, function() {
			$mbContentItems.hide();
			$mbWrapper.hide();
		});

		disperse();
		return false;
	});

	/*
		click an image from "Works" content item,
		displays the image on the background
	 */
	$works.bind('click', function(e) {
		var source	= $(this).children('img').data('bgimg');
		changeBGImage(source);
		return false;
	});

},
</pre>
<p>When we click on one of the thumbnails in the &#8220;Work&#8221; section, we want the background image to change. So we define:</p>
<pre class="brush:js">
changeBGImage			= function(img) {
	//if its the current one return
	if($mb_bgimage.attr('src') === img || $mb_bgimage.siblings('img').length > 0)
		return false;

	var $itemImage = $('&lt;img src="'+img+'" alt="Background" class="mb_bgimage" style="display:none;"/&gt;');
	$itemImage.insertBefore($mb_bgimage);

	$mb_bgimage.fadeOut(1000, function() {
		$(this).remove();
		$mb_bgimage = $itemImage;
	});
	$itemImage.fadeIn(1000);
},
</pre>
<p>This shows a content item when there is already one shown:</p>
<pre class="brush:js">
showContentItem			= function(pos) {
	$mbContentItems.hide();
	$mbWrapper.show();
	$mbContentItems.eq(pos).show().children('.mb_content_inner').jScrollPane();
},
</pre>
<p>&#8220;openItem&#8221; moves the boxes from the top to the center of the page, and shows the respective content item:</p>
<pre class="brush:js">
openItem				= function(pos, speed, easing) {
	return $.Deferred(
		function(dfd) {
			$mbPattern.children().each(function(i) {
				var $el			= $(this),
				param		= {
					width	: '100px',
					height	: '100px',
					top		: 154 + 100 * Math.floor(i/4),
					left	: 200 + 100 * (i%4),
					opacity	: 1
				};

				if (!$.browser.msie)
					param.rotate	= '0deg';

				$el.animate(param, speed, easing, dfd.resolve);
			});
		}
	).promise();
};
</pre>
<p>And that&#8217;s it! We really hope you enjoyed the tutorial and find it useful! </p>
<p><a class="demo" href="http://tympanus.net/Tutorials/MovingBoxesContent/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/MovingBoxesContent/MovingBoxesContent.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/03/28/moving-boxes-content/feed/</wfw:commentRss>
		<slash:comments>76</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  tympanus.net/codrops/tag/navigation/feed/ ) in 0.32802 seconds, on Feb 8th, 2012 at 5:40 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 8th, 2012 at 6:40 pm UTC -->
