» » Pure CSS3 to realize rotation effect of icon

 

Pure CSS3 to realize rotation effect of icon

Author: bamboo06 on 17-02-2016, 00:44, views: 15917

76
CSS3 has a transform, which can make the target object deformation, transformation, change. Applied to the need to convert the angle, changing the size and other scenes, such as icons rotate, zoom in and out the background, etc., in short, transform is deformed, change the meaning, it belongs to the advanced technology of CSS3.


Examples of this paper, we give a brief transform common application, that is, when we slide icon with the mouse button, the icon will automatically rotate a week, this effect does not rely JS, css3 of the transform can be completed.
Transform Introduction
In CSS3 transform include the following: a rotating rotate, distort skew, scale and move the zoom and translate matrix deformation matrix.
1, the rotation rotate (): by specifying parameters on the angle of the original elements of a 2D rotation (2D rotation), angle refers to the angle of rotation, if the setting is a positive number represents clockwise rotation, a negative number indicates counterclockwise rotation. Such as: transform: rotate (30deg).
2, twisted skew ([,]): skew X-axis Y-axis transformation (miter conversion). The first parameter corresponds to the X-axis, Y-axis corresponds to the second parameter. If the second argument is not provided, the value is 0, that is, no miter on the Y-axis direction. skew is used to distort the line elements, the first parameter is the twist angle in the horizontal direction, and the second parameter is the twist angle in the vertical direction. Wherein the second parameter is optional and defaults to 0deg.
3, Zoom scale ([,]): provides instructions for performing [sx, sy] scaling vector two parameters specify a 2D scale (2D scaling). If the second argument is not provided, then take the same value as the first parameter. scale (X, Y) is used for the element to zoom, you can transform-origin to point set of elements, elements of the same point in a central location; group X represents a multiple of horizontal scaling, Y represents the vertical zoom ratio and Y is an optional parameter, if the Y value is not set, then zoom ratio X, Y is the same in both directions. And X prevail. Such as: transform: scale (2,1.5).
4, the mobile translate ([,]): specified by the vector [tx, ty] a 2D translation, tx is the first transition parameter, ty is the second transition parameter options. If it is not provided, ty 0 as its value. That is translate (x, y), which represents an object pan, according to the set x, y parameter value, when value is negative, the opposite direction of moving objects, which defaults to the element center point can also be based transform-origin changes basis points. Such as transform: translate (100px, 20px).
5, matrix deformation matrix (,,,,,): in the form of a six-containing values ​​(a, b, c, d, e, f) specifies a 2D transformation matrix transformation, the equivalent of a direct application of [abcdef] conversion matrix. Is based on the horizontal direction (X axis) and vertical (Y-axis) repositioning elements, this attribute value relates to the use of a matrix mathematics.

Example: rotation icon
To rotate the icon, just use the rotate transform and transition animation effect to complete rotation. In this case, we are ready to two pictures as a background image when the mouse slide icon, icons do 360 degree rotation motion, html structure is as follows:
<ul class="icos">
	<li class="female"><a href="#"><i></i>Female</a></li>
	<li class="arrow"><a href="#"><i></i>Arrow</a></li>
</ul>

Use CSS3 to complete the connection with the following icons rotation effect.
ul { width: 145px; margin: 0 auto; list-style: none; font-size: 30px; } 
li{padding:10px } 
li a{width:145px;height:42px;line-height:36px;display:block;color:#333} 
li a:hover{text-decoration:none} 
li a i { background: url(icon.png) no-repeat; display: block; width: 42px; height: 32px; position: relative; z-index: 10; float:left; 
    -webkit-transition: -webkit-transform 0.4s ease-out; 
    -moz-transition: -moz-transform 0.4s ease-out; 
    transition: transform 0.4s ease-out; 
} 
li a:hover i { 
    -webkit-transform: rotate(360deg); 
    -moz-transform: rotate(360deg); 
    transform: rotate(360deg); 
} 
 
li.female a i { background-position: 0 0; } 
li.arrow a i { background-position: 0 -50px; } 

Category: CSS

Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.
<
  • 0 Comments
  • 0 Articles
15 September 2017 22:35

v

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
It was wondering if I could use this write-up on my other website, I will link it back to your website though.Great Thanks. Australia

I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work. generate iota seed

I have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks! www.nationaldebtreliefreviews.com

<
  • 0 Comments
  • 0 Articles
17 September 2017 19:29

jhon

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
I love the way you write and share your niche! Very interesting and different! Keep it coming! win your ex husband back soon

<
  • 0 Comments
  • 0 Articles
17 September 2017 23:50

ella spraggins

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
if you have been trying too many products about vaginal tightening and never got a satisfactory result out of it. I suggest it is finally a right place for you.For more details Visit: http://howtomakeyourvaginatighter.org/

<
  • 0 Comments
  • 0 Articles
20 September 2017 18:33

ali

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
I went over this website and I believe you have a lot of wonderful information, saved to my bookmarks drug rehabilitation program

<
  • 0 Comments
  • 0 Articles
20 September 2017 19:28

morning world

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. https://www.lottospielen24.org/

<
  • 0 Comments
  • 0 Articles
20 September 2017 19:46

ella spraggins

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Here is my personal experience and review of this popular vaginal tightening cream. If you have worries about having a <a href="http://howtomakeyourvaginatighter.org/">loose pussy</a> area.

<
  • 0 Comments
  • 0 Articles
21 September 2017 03:52

SANNY

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Once I thought about things like: why such information is for free here? Because when you write a book then at least on selling a book you get a percentage. Thank you and good luck on informing people more about it!
custom essay writing service

<
  • 0 Comments
  • 0 Articles
22 September 2017 00:01

sethslayer

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
love every post here very useful and informative thanks for sharing

http://biotic365.co/

<
  • 0 Comments
  • 0 Articles
22 September 2017 23:14

vipseo

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
When you use a genuine service, you will be able to provide instructions, share materials and choose the formatting style. ペニス増大

<
  • 0 Comments
  • 0 Articles
25 September 2017 03:01

vipseo

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
This type of message always inspiring and I prefer to read quality content, so happy to find good place to many here in the post, the writing is just great, thanks for the post. blue wafflea

<
  • 0 Comments
  • 0 Articles
27 September 2017 23:41

vipseo

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
This is highly informatics, crisp and clear. I think that everything has been described in systematic manner so that reader could get maximum information and learn many things. Church & Shuter Condos

<
  • 0 Comments
  • 0 Articles
28 September 2017 19:27

john sxyena

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
i love reading this article so beautiful!!great job! MSC cruises

<
  • 0 Comments
  • 0 Articles
28 September 2017 22:41

vipseo

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Thanks For sharing this Superb article.I use this Article to show my assignment in college.it is useful For me Great Work. offshore server

<
  • 0 Comments
  • 0 Articles
2 October 2017 19:39

vipseo

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Most of the time I don’t make comments on websites, but I'd like to say that this article really forced me to do so. Really nice post! Trust Flow Blog Comments

<
  • 0 Comments
  • 0 Articles
2 October 2017 22:33

Gale Snider

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Instantly the site could irrefutably get famed among the most of posting consumers, because of its diligent article content or simply critical reviews. trust flow backlinks

<
  • 0 Comments
  • 0 Articles
3 October 2017 02:42

morning world

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!Thanks Yacht Charter Greece

<
  • 0 Comments
  • 0 Articles
3 October 2017 19:39

morning world

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
I haven’t any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us.Holzfenster

<
  • 0 Comments
  • 0 Articles
3 October 2017 22:36

v

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
This is highly informatics, crisp and clear. I think that everything has been described in systematic manner so that reader could get maximum information and learn many things. Trust Flow Blog Comments

<
  • 0 Comments
  • 0 Articles
5 October 2017 17:03

sohail khatri

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
This is my first visit to your web journal! We are a group of volunteers and new activities in the same specialty. Website gave us helpful data to work. dotwork tattoo

This is my first visit to your web journal! We are a group of volunteers and new activities in the same specialty. Website gave us helpful data to work. dotwork tattoo

<
  • 0 Comments
  • 0 Articles
9 October 2017 17:55

vipseo

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Only aspire to mention ones content can be as incredible. This clarity with your post is superb and that i may think you’re a guru for this issue. High-quality along with your concur permit me to to seize your current give to keep modified by using approaching blog post. Thanks a lot hundreds of along with you should go on the pleasurable get the job done. Seo Freelancer

<
  • 0 Comments
  • 0 Articles
9 October 2017 17:56

vipseo

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Only aspire to mention ones content can be as incredible. This clarity with your post is superb and that i may think you’re a guru for this issue. High-quality along with your concur permit me to to seize your current give to keep modified by using approaching blog post. Thanks a lot hundreds of along with you should go on the pleasurable get the job done. Seo Freelancer

<
  • 0 Comments
  • 0 Articles
9 October 2017 17:57

vipseo

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Only aspire to mention ones content can be as incredible. This clarity with your post is superb and that i may think you’re a guru for this issue. High-quality along with your concur permit me to to seize your current give to keep modified by using approaching blog post. Thanks a lot hundreds of along with you should go on the pleasurable get the job done. Seo Freelancer

<
  • 0 Comments
  • 0 Articles
9 October 2017 17:59

vipseo

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Only aspire to mention ones content can be as incredible. This clarity with your post is superb and that i may think you’re a guru for this issue. High-quality along with your concur permit me to to seize your current give to keep modified by using approaching blog post. Thanks a lot hundreds of along with you should go on the pleasurable get the job done. Seo Freelancer

<
  • 0 Comments
  • 0 Articles
11 October 2017 18:31

James

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
This is often just as a fantastic articles my partner and i really actually enjoyed examining. This is simply not on a regular basis that i have got prospective to work through a concern. informatica

<
  • 0 Comments
  • 0 Articles
28 October 2017 00:20

Aalin

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
This really is in addition a reasonably very good short article we surely much-loved inspecting. Not really daily which in turn take advantage of the possibilities to identify a product or service. jobs in port harcourt

<
  • 0 Comments
  • 0 Articles
7 November 2017 05:02

seo master

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. defimg

<
  • 0 Comments
  • 0 Articles
13 November 2017 21:13

morning world

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
It was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing. BathMate

<
  • 0 Comments
  • 0 Articles
14 November 2017 17:39

morning world

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Only aspire to mention ones content can be as incredible. This clarity with your post is superb and that i may think you’re a guru for this issue. High-quality along with your concur permit me to to seize your current give to keep modified by using approaching blog post. Thanks a lot hundreds of along with you should go on the pleasurable get the job done. Garcinia Cambogia Dr Oz

<
  • 0 Comments
  • 0 Articles
15 November 2017 18:43

morning world

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. Dr Oz Weight Loss

<
  • 0 Comments
  • 0 Articles
17 November 2017 19:43

morning world

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
I appreciated your work very thanks Best Weight Loss Pills for Women

Information
Comment on the news site is possible only within (days) days from the date of publication.