Pure css3 transforms 3D text open flip 3D open effect, css3transforms

Source: Internet
Author: User

Pure css3 transforms 3D text open flip 3D open effect, css3transforms

 

For details, click

 

Online Preview download now

In this tutorial, we will create an interesting 3D open Effect Based on CSS3. The purpose of this tutorial is to show how we can bring about some practical use of CSS3.

 


Html:

<Ul class = "grid">
<Li class = "ot-letter-left"> <span data-letter = "C"> C </span> </li>
<Li class = "ot-letter-top"> <span data-letter = "J"> J </span> </li>
<Li class = "ot-letter-right"> <span data-letter = "8"> 8 </span> </li>
<Li class = "ot-letter-bottom"> <span data-letter = "A"> A </span> </li>
</Ul>

Css:

. Grid li span {
Display: inline-block;
Font-weight: 900;
Line-height: 1;
Position: relative;
Color: hsla (0, 0%, 0%, 0.6 );
Transform-style: preserve-3d;
Perspective: 550px;
Z-index: 1;
}
. Grid li span: before,
. Grid li span: after {
Position: absolute;
Content: attr (data-letter );
Line-height: inherit;
Top: 0;
Left: 0;
Right: 0;
Bottom: 0;
Z-index: 2;
Transition: all 0.3 s;
}

. Grid li span: before {
Text-shadow: none;
Color: hsla (0, 0%, 0%, 0.12 );
}
. Ot-letter-left span: before,
. Ot-letter-left span: after {
Transform-origin: 0 50%;
}
. Ot-letter-left span: before {
Transform: scale (1.08, 1) skew (0deg, 1deg );
}

. Ot-letter-left span: after {
Text-shadow:
-1px 0px 0px hsla (360,100%, 100%, 0.1 ),
3px 0px 1px hsla (0, 0%, 0%, 0.4 );
Transform: rotateY (-15deg );
}
. Ot-letter-left: hover span: before {
Transform: scale (0.85, 1) skew (0deg, 20deg );
}

. Ot-letter-left: hover span: after {
Transform: rotateY (-40deg );
}
. Ot-letter-left {
Background: # e74d3c;
}

. Ot-letter-left span {
Text-shadow:
1px 4px 6px # e74d3c,
0 0 0 hsla (0, 0%, 0%, 0.3 ),
1px 4px 6px # e74d3c;
}

. Ot-letter-left span: after {
Color: # e74d3c;
}

. Ot-letter-left: hover span: after {
Color: # ea6253;
}
. Ot-letter-left {
Background: # e74d3c;
}

. Ot-letter-left span {
Text-shadow:
1px 4px 6px # e74d3c,
0 0 0 hsla (0, 0%, 0%, 0.3 ),
1px 4px 6px # e74d3c;
}

. Ot-letter-left span: after {
Color: # e74d3c;
}

. Ot-letter-left: hover span: after {
Color: # ea6253;
}
. Ot-letter-bottom span: before,
. Ot-letter-bottom span: after {
Transform-origin: 50% 0;
}

. Ot-letter-bottom span: before {
Transform: scale (1, 1.05) skew (4deg, 0deg );
}

. Ot-letter-bottom span: after {
Text-shadow:
0px-1px 0px hsla (360,100%, 100%, 0.1 ),
0px 3px 1px hsla (0, 0%, 0%, 0.4 );
Transform: rotateX (15deg );
}

. Ot-letter-bottom: hover span: before {
Transform: translateY (-0.035em) scale (1, 1.2) skew (10deg, 0deg );
}

. Ot-letter-bottom: hover span: after {
Transform: translateY (0.045em) rotateX (40deg );
}

Online Preview download now

 

Learning Source: http://tympanus.net/Tutorials/AnimatedOpeningType/

 

For more information about htnl5/css3, click

 

Related Article

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.