Showing posts with label Css. Show all posts
Showing posts with label Css. Show all posts

Friday, 3 July 2015

web designingA great way to put some animation effects on specified element is CSS3 animation. 

1. @keyframes

 

@keyframes allows us to divide animation in frames. Without keyframe animation won't work. You can specify initial and final property by using percentage or using keywords like “from”, “to”.

@keyframe value_of_animation_name_property{ from{} to{} }

2. Animation properties : 

 

  • Animation-name.
  • Animation-duration.
  • Animation-timing-function.
  • Animation-delay.
  • Animation-iteration-count.
  • Animation-direction.
  • Animation-play-state.

Animation-name : 

 

With the help of Animation name property you can specify the name to the animation. It helps you to create unique identity of specified animation effect. Animation-name will be used in the syntax of @keyframes.
Example. animation-name : sushrut;

Animation-duration :

 

This property represents  the duration of the animation. The value of this property is generally written in seconds or milliseconds.
 
Example. animation-duration: 3s;

Animation-timing-function : 

 

Sometimes animation varies speed from between its stars to end. To control its speed Animation-timing-function is used.

Example: animation-timing-function: ease-in;

Animation-timing-function values.
  • Linear:  Maintains same speed thoughout animation
  • Ease: Start with fast speed and ends with slow speed.
  • Ease-in: Start with slow speed and ends with fast speed.
  • Ease-out: Looks same as Ease.
  • Ease-in-out: Start with slow, increases speed at middle and ends with slow speed.

Animation-delay : 

 

It represents the speed of the animation. The value of this property is generally written in seconds or milliseconds. More seconds means more delay.

Example. animation-delay: 3s;

Animation-iteration-count : 

 

Animation-iteration-count represents the frequency of the animation.

Example. animation-iteration-count: 5;

Animation-direction : 

 

Animation-direction defines normal and reverse direction.

Example: Animation direction: alternate;


Animation direction values.


normal: Animation will work normally. Animation will start from starting frame and ends with ending frame. Again start with starting frame and so on.

reverse:  Animation will be reverse. Animation will start from ending frame and ends with starting frame. Again start with ending frame and so on.

alternate: Animation will start from starting frame and ends with ending frame. Then start with ending frame and ends with starting frame and so on

alternate-reverse:  Animation will start from ending frame and ends with starting frame. Then start with starting frame and ends with ending frame and so on.


Animation-play-state : 

 

Animation-play-state values helps to decide whether the animation should keep running or pause. Default value is running.

Example: animation-play-state: paused;


Animation compatibility extension according to browser.

 

If you have read the following example, you will see that, I have added same code twice and added webkit extension in one of them. Why I have done that? Because I want, animation should work for all browsers. If I run the code without using webkit, then animation will not work on Google Chrome, Opera and Safari. Animation will work on Mozilla Firefox.

Regards : Web Designing company 

 

Tuesday, 9 June 2015

Each website's structure is followed by a header, middle section, and footer. Users now expect it and appreciate the consistency. But in some cases footer is a bit tricky if a page does not have a considerable measure of content.

Most commonly, we need a footer that 'stick' to the bottom of a page and not the bottom of a browser, that footer is also called a 'sticky footer'. If your web page has a very little content and footer is not stick to the bottom then the site looks irritating. 


Setting the footer at absolute bottom of a site page has been an issue for a long time, but I will reveal to you a complete HTML and CSS full solution.

Many website's footer displays in the middle of the page, which is never where we want a footer. Sure, we could strap the footer to the bottom of the window, but a footer that moves with the page is almost as annoying. So, how can we push a footer to the bottom of a page for both pages with a lot of content and those with little content. It's easy with a simple little trick that all browsers since IE 6 understand.


web designing



We could have used JavaScript to push the footer down to the bottom of the page, but why use JavaScript when CSS will do? The last important note is that some footers are bigger than other, which means you might have to modify the footer's height in order to have a footer that you like.I hope this example really helpfull as much as me  ,  and that your "sticky footer" problem is solved now.

Regards : Web Design Company



  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube