CSS3 Foundation Instance 2-box-shadow, Border-radius circle icon and internal rotation

Source: Internet
Author: User

First of all, the transition attribute IE9 is not supported, starting with IE10 support
The example is when the mouse moves over the DIV, it rotates 180 degrees.
Points:

  • Make round boxes with rounded corners, border-radius set to 50%;
  • with Box-shadow to make the fill filled with the effect, Box-shadow has 6 parameters
    1. blur distance (px);
    2. shadow size (px);
    3. shadow color;
    4. outer Shadow (outset, default) or internal (inset);
  • transition animate, the icon in the round box is also followed by 180 degrees  
    -note that if an element has more than one animation, transition can only be used once, otherwise the following will overwrite the front, then you can write multiple styles in a transition , and then separated by commas
<style>.box{ width: 100px; height: 100px; border  -  radius  :  Span style= "color: #195f91;" >50 %;  //this rounded corner takes up 50% wide and becomes a circle   box  - shadow  :  0  0  1px   black inset  ; position: relative;transition:Box-Shadow0.2sLinear0s,Transform0.2sLinear0s; //write multiple styles in a transition and then separate them with commas .} box  :  hover  {  box  - shadow  :  0  0  50px   black inset  ; transform: rotate(180deg);}.icon{ height: 20%; :  20  %;   background   :   URL   ( 3.jpg  )  no  Span style= "color: #93a1a1; Font-weight:bold; " >-   position: absolute; top: 40px; left: 40px;}</style><script></script><body> <div class="box"> <div class="icon"></div> </div></body>

CSS3 Foundation Instance 2-box-shadow, Border-radius circle icon and internal rotation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.