Loading...

Create dynamic 3D with beautiful CSS3

View: 1098    Dowload: 0   Comment: 0   Post by: hanhga   Category: References   Fields: Other

Animating for CSS3, perhaps for many people who are not too strange since it was born. But CSS3 can not just stop at that, but it also creates 3D effects extremely nice not much different than the software create professional animations.
If you do not yet believe they can clearly see the demo below (you should see on browsers like Firefox or Chrome, and do not use IE, because this browser is still not much support for CSS3, especially the old version).

Step 1: HTML

You need to have the html standard framework as follows:

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
<div class="book-container">
 
    <div class="book">
 
        <div class="book-cover">
            <img src="images/cover.jpg" />
        div>
 
        <div class="book-spine">
            <h1>The Book's Spine Texth1>
        div>
 
    div>
 
div>

Step 2: The CSS

You copy the following css:

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/* Book
----------------------------------------------------- */
.book-container {
    width: 375px;
    margin: 0 auto;
    display: block;
    -webkit-perspective: 1200px;
    -moz-perspective: 1200px;
    perspective: 1200px;
}
 
.book {
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    -webkit-transition: 0.75s;
    -moz-transition: 0.75s;
    transition: 0.75s;
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-transform-origin: 125px 0;
    -moz-transform-origin: 125px 0;
    transform-origin: 125px 0;
}
.book:after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 3px;
    width: 7px;
    background: url(images/ridge.png) repeat-y; z-index: 20;
    -webkit-transform: translateZ(1px); /* Fix for flickering in Chrome  */
}
.book:hover {
    -webkit-transform: translateX(-10px) translateZ(35px) translateX(35px) rotateY(45deg);
    -moz-transform: translateX(-10px) translateZ(35px) translateX(35px) rotateY(45deg);
    transform: translateX(-10px) translateZ(35px) translateX(35px) rotateY(45deg);
}
 
/*
Book cover and spine
---------------------------------------------------------------------------------------------------------------------------------------------------- */
.book-cover { position: relative; z-index: 10; }
.book-cover img { vertical-align: bottom; max-width: 100%; height: auto; }
 
.book-spine {
    position: absolute;
    color: #fff;
    bottom: 0;
    top: 0;
    width: 50px;
    z-index: 5;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    background: url(images/spine.jpg) -64px 0 no-repeat;
    background-size: auto 100%;
    -webkit-transform: rotateY(-90deg) translateX(-49px);
    -moz-transform: rotateY(-90deg) translateX(-49px);
    transform: rotateY(-90deg) translateX(-49px);
    -webkit-transform-origin: 0 0;
    -moz-transform-origin: 0 0;
    transform-origin: 0 0;
}
.book-spine h1 {
    display: block;
    width: 325px;
    text-align: left;
    color: #fff;
    position: absolute;
    top: 0;
    left: 39px;
    text-indent: 43px;
    text-transform: uppercase;
    font-family: "league_gothic_condensedRg", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 2em; opacity: 0.75; font-weight: normal;
    -webkit-font-smoothing: antialiased;
    -webkit-transform: rotateZ(90deg);
    -moz-transform: rotateZ(90deg);
    transform: rotateZ(90deg);
    -webkit-transform-origin: 0 0;
    -moz-transform-origin: 0 0;
    transform-origin: 0 0;
}
.book-spine:before { display: block; content: ""; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.3); }

So that's it then you, trick here is if you know deft combination of attributes transform and transition as you can do many different 3D effect. I hope, through this article, you can invent many other 3D models, their shared memory and the other you know if you do it offline.

Create dynamic 3D with beautiful CSS3

Animating for CSS3, perhaps for many people who are not too strange since it was born. But CSS3 can not just stop at that, but it also creates 3D effects extremely nice not much different than the software create professional animations.

Posted on 17-08-2015 

Comment:

To comment you must be logged in members.

Files with category

  • Instructions for installing and configuring Windows Live Mail on Windows 10 simple

    Instructions for installing and configuring Windows Live Mail on Windows 10 simple

    View: 3489    Download: 0   Comment: 0

    Category: References     Fields: Other

    Windows 10 pre-installed Mail application for managing personal email on the device. The latest version of this application but improved a lot and support other email accounts such as Gmail or Yahoo Mail but users almost no "salty" really with this...

  • Step by step instructions to create social networking buttons with CSS3

    Step by step instructions to create social networking buttons with CSS3

    View: 2484    Download: 0   Comment: 0

    Category: References     Fields: Other

    CSS3 help web designers have the ability to create buttons (buttons) very nice, today I will share with you two tips decoration for button in your web becomes radiant beauty that no need to use photoshop.

  • You should understand the CSS Box Shadow

    You should understand the CSS Box Shadow

    View: 2574    Download: 0   Comment: 0

    Category: References     Fields: Other

    Effects his shadow was introduced in the previous article, however, in this article, I will guide more specific about shadow attributes, you try it with anything. First we try to learn css following paragraph:

  • How to do button movement with beautiful CSS3

    How to do button movement with beautiful CSS3

    View: 2235    Download: 0   Comment: 0

    Category: References     Fields: Other

    Previously to create motion effects button, you must draw the button in photoshop, then switched to flash to make it possible to move. But now you need not spend too much time doing it, all because of the emergence of CSS3.

  • Create a dropdown menu with CSS3 effects with beautiful transtions

    Create a dropdown menu with CSS3 effects with beautiful transtions

    View: 2420    Download: 0   Comment: 0

    Category: References     Fields: Other

    More of the dropdown menu you want to introduce to you, this will have the effect menu transitions (converted background of menu background from pale to dark). This menu works well on browsers like FF, Chrome, Safary, but unfortunately did not work...

  • How to hack css for all browsers you should know

    How to hack css for all browsers you should know

    View: 1994    Download: 0   Comment: 0

    Category: References     Fields: Other

    In the process of web design, which makes it the most headaches is how to design web pages that you can run on the browser. Especially when clients use the old as IE6 browser such. However, with this article, you will easily edit interface runs well...

  • Create Accordion with extremely beautiful CSS3

    Create Accordion with extremely beautiful CSS3

    View: 2518    Download: 0   Comment: 0

    Category: References     Fields: Other

    Accordion is a technique that helps you shortened the content that you want displayed on the website. It is often used for the display of submenus. In addition you can also use it for content, images. Before applying this procedure, you have to use...

  • Create the effect Hovercho images with Webkit and CSS3 is great

    Create the effect Hovercho images with Webkit and CSS3 is great

    View: 2159    Download: 0   Comment: 0

    Category: References     Fields: Other

    WebKit is one open source application framework provides the necessary components built one for your web browser. Along with CSS3, cả have contributed to very nice effect những previously only using JavaScript or JQuery thực beige.​

 
File suggestion for you
Loading...
File top downloads
Loading...
Loading...
Codetitle - library source code to share, download the file to the community
Copyright © 2018. All rights reserved. codetitle Develope by Vinagon .Ltd