Skip to main content

Awesome Page Transitions With Css3

Hi guys. Do you want to create a webpage with awesome transitions then this tutorial will definately help you.In last couple of years developers used javascript for making transitions effects in the webpage.These were good but takes a little time to load the script.This tutorial is all about magic of CSS3. Here all amazing effects are to be displayed with css.
With :target element all operation is performed. It is really cool. Lets get started with this stuff.All we need is just simple html code an awesome css and little creativity.

Download the Code

Html Code:


<!-- Home -->
<div id="home" class="content">
   <h2>Home</h2>
   <p>----</p>
  </div>
  <!-- /Home -->
  
  <!-- Portfolio -->
  <div id="portfolio" class="panel">
   <div class="content">
    <h2>Amaging Clicks</h2>
    <p>-----</p>
    <ul id="works">
     <li><a href="#"><img src="images/portfolio_01.jpg" width="250"></a></li>
     <li><a href="#"><img src="images/portfolio_02.jpg" width="250"></a></li>
     <li><a href="#"><img src="images/portfolio_03.jpg" width="250"></a></li>
    </ul>
    <p class="footnote">Nice clicks by <a href="http://www.tricktodesign.com/">Tricktodesign</a>.</p>
   </div>
  </div>
  <!-- /Portfolio -->
  
  <!-- About -->
  <div id="about" class="panel">
   <div class="content">
    <h2>About</h2>
    <p>-----</p>
   </div>
  </div>
  <!-- /About -->
  
  <!-- Contact -->
  <div id="contact" class="panel">
   <div class="content">
    <h2>Contact</h2>
    <p>------</p>
    <form id="form">
     <p><label>Your Name</label><input type="text" /></p>
     <p><label>Your Email</label><input type="text" /></p>
     <p><label>Your Message</label><textarea></textarea></p>
    </form>
   </div>
  </div>

Brief Look :


Css Code:

Here starts the important part. We had assigned basic css in a file named demo. Css for <p> and <h> and other basic elements. Css for page are in seperate file.
The navigation bar Css is :

#navigation {
 margin-top: 20px;
 width: 235px;
 display:block;
 list-style:none;
 z-index:3;
}
#navigation a{
 color: #444;
 display: block;
 background: #fff;
 background: rgba(255,255,255,0.9);
 line-height: 50px;
 padding: 0px 20px;
 text-transform: uppercase;
 margin-bottom: 6px;
 box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
 font-size: 14px;
}
#navigation a:hover {
 background: #ddd;
}

Switching between pages is the important part and all transition effects are shown up in this criteria. For this purpose we had to use :target element of css with our navigation panel. Its css is :


.panel{
 min-width: 100%;
 height: 98%;
 overflow-y: auto;
 overflow-x: hidden;
 margin-top: -150%;
 position: absolute;
 background: #000;
 box-shadow: 0px 4px 7px rgba(0,0,0,0.6);
 z-index: 2;
 -webkit-transition: all .8s ease-in-out;
 -moz-transition: all .8s ease-in-out;
 -o-transition: all .8s ease-in-out;
 transition: all .8s ease-in-out;
}
.panel:target{
 margin-top: 0%;
 background-color: #ffcb00;
}
#home:target ~ #header #navigation #link-home,
#portfolio:target ~ #header #navigation #link-portfolio,
#about:target ~ #header #navigation #link-about,
#contact:target ~ #header #navigation #link-contact{
 background: #000;
 color: #fff;
}
Hope this tutorial will help you.

source codrops

Comments

  1. As most of us using JavaScript for some transitions effect over years but for now we got a best replacement to it i.e, using CSS3 transitions and the :target property we will do all the magic. It's a nice source to feel that.

    ReplyDelete

Post a Comment

your Comment is sent for moderation, Thankyou

Popular posts from this blog

OSI Model (Tutorial-6)

What is the OSI model ? Open Systems Interconnection model is fundamental to all communications between network devices.  Developed in 1974 by ISO after the American Department of Defence began using the TCP/IP suite of protocols.  Finally adopted in 1977. It is now the theoretical model for how communication takes place between network devices. What are the seven layers ? Layers OSI Model Layer 7  Layer 6  Layer 5  Layer 4  Layer 3  Layer 2  Layer 1

Eden: PHP Library To Get Things Easy For PHP Developer

Eden is PHP Library designed for helping developers in their rapid development work. In Our most of the project we have to integrate our developed website or application with most of  the social networking websites like Google, Facebook, Twitter, yahoo etc. so what we do is we integrate libraries of different websites differently Although We could make the code reusable but still if the websites increases then confusion will also increases. Adding different libraries form different sources add more complexity to your project and ends up to be hard to maintain. Eden simply a set of reusable components, that works with any PHP framework and CMS. Eden makes code logical and readable with dead simple syntax. Eden Will work With Most Of Web services including Amazon Web service Facebook Foursquare Google twitter tumbler Paypal Yahoo You could Download the File From  Eden Official Website  and Can use this will just a simply including this...

Network Topologies (Tutorial-4)

Topology refers to the way in which the network of computers is connected. The choice of topology is dependent upon--- Type and number of equipment being used  Planned applications and rate of data transfers  Required response times  Cost Types of Network Topologies Physical Topology: Physical topology defines how devices are connected to the network through the actual cables that transmit data(physical structure of the network)  Logical Topology: Logical Topology (also referred to as Signal Topology) is a network computing term used to describe the arrangement of devices on a network and how they communicate with one another.