3D Box Animation

Source: Internet
Author: User

3D Box Animation


Material:

  1. Some square pictures


  2. 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/91/wKiom1YBDU-y4-omAAUYi4p4SE8309.jpg "style=" float: none; "title=" 01.png "alt=" Wkiom1ybdu-y4-omaauyi4p4se8309.jpg "/>

  3. 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/91/wKiom1YBDVDRR2KUAAYBWnAZ2V8360.jpg "style=" float: none; "title=" 02.png "alt=" Wkiom1ybdvdrr2kuaaybwnaz2v8360.jpg "/>

  4. 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/8F/wKioL1YBD5DSuL4vAAYwQFOGExc357.jpg "style=" float: none; "title=" 03.png "alt=" Wkiol1ybd5dsul4vaaywqfogexc357.jpg "/>

  5. 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/91/wKiom1YBDVKQbcodAAQt589-5d0969.jpg "style=" float: none; "title=" 04.png "alt=" Wkiom1ybdvkqbcodaaqt589-5d0969.jpg "/>

  6. 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/8F/wKioL1YBD5GgbK_kAAPbUHL0H6w102.jpg "style=" float: none; "title=" 05.png "alt=" Wkiol1ybd5ggbk_kaapbuhl0h6w102.jpg "/>

  7. 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/8F/wKioL1YBD5Li4LbJAAYQkD4dyvU392.jpg "style=" float: none; "title=" 06.png "alt=" Wkiol1ybd5li4lbjaayqkd4dyvu392.jpg "/>


The following is the source code:

---------------------------------------------------------

<!doctype html>

<meta charset= "UTF-8" >

<meta name= "Generator" content= "EditPlus" >

<meta name= "Author" content= "" >

<meta name= "Keywords" content= "" >

<meta name= "Description" content= "" >

<title>3d Animation box</title>

<style type=text/css>

. warpper{position:fixed;top:30%;left:40%;p erspective:1000px;}

. cube{

width:300px;height:300px;

transform-style:preserve-3d;/* setting up a 3D environment */

}


. side{

width:300px;height:300px;

Background:rgba (255,121,134,0.6);

Position:absolute;

font-size:60px;

Color: #fff;

line-height:300px;

Text-align:center;

border:1px solid red;

border-radius:50%;

}

. side_top{

width:300px;height:300px;

/*background:rgba (255,121,134,0.6); * *

Background-image:url (img/01.png);

Position:absolute;

font-size:60px;

Color: #fff;

line-height:300px;

Text-align:center;

border:1px solid red;

/*border-radius:50%;*/

opacity:0.9;

}

. side_bottom{

width:300px;height:300px;

/*background:rgba (255,121,134,0.6); * *

Background-image:url (img/02.png);

Position:absolute;

font-size:60px;

Color: #fff;

line-height:300px;

Text-align:center;

border:1px solid red;

/*border-radius:50%;*/

opacity:0.9;

}

. side_left{

width:300px;height:300px;

/*background:rgba (255,121,134,0.6); * *

Background-image:url (img/03.png);

Position:absolute;

font-size:60px;

Color: #fff;

line-height:300px;

Text-align:center;

border:1px solid red;

/*border-radius:50%;*/

opacity:0.9;

}

. side_right{

width:300px;height:300px;

/*background:rgba (255,121,134,0.6); * *

Background-image:url (img/04.png);

Position:absolute;

font-size:60px;

Color: #fff;

line-height:300px;

Text-align:center;

border:1px solid red;

/*border-radius:50%;*/

opacity:0.9;

}

. side_back{

width:300px;height:300px;

/*background:rgba (255,121,134,0.6); * *

Background-image:url (img/05.png);

Position:absolute;

font-size:60px;

Color: #fff;

line-height:300px;

Text-align:center;

border:1px solid red;

/*border-radius:50%;*/

opacity:0.9;

}

. side_front{

width:300px;height:300px;

/*background:rgba (255,121,134,0.6); * *

Background-image:url (img/06.png);

Position:absolute;

font-size:60px;

Color: #fff;

line-height:300px;

Text-align:center;

border:1px solid red;

/*border-radius:50%;*/

opacity:0.7;

}


. Top{transform:rotatex (90deg) Translatez (150px);}

. Bottom{transform:rotatex ( -90deg) Translatez (150px);}

. Left{transform:rotatey ( -90deg) Translatez (150px);}

. Right{transform:rotatey (90deg) Translatez (150px);}

. Back{transform:rotatex (180deg) Translatez (150px);}

. Front{transform:rotatey (0deg) Translatez (150px);}

</style>

<body>

<div class= "Warpper" >

<div class= "Cube" id= "Cube" >

<div class= "Top Side_top" >1</div>

<div class= "Bottom Side_bottom" >2</div>

<div class= "left Side_left" >3</div>

<div class= "Right Side_right" >4</div>

<div class= "Back Side_back" >5</div>

<div class= "Front Side_front" >6</div>

</div>

</div>

<!--<script type= "Text/javascript" src= "Js/niannian-kuku.js" ></script>-->

<script type= "Text/javascript" >

var cubedom = document.getElementById ("cube");

var y = 0;

SetInterval (function () {

if (y>360) {

y=0;

}

Y + = 5;

CubeDom.style.transform = "Rotatey (" +y+ "deg) Rotatex (" +y+ "deg)";

Document.body.style.background = Kuku. Randomcolor ();

Document.body.innerHTML = Kuku. RANDOMNMB (1,11);

},100);

</script>

</body>


--------------------------------------------

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/91/wKiom1YBDjSzziU9AAIekPSN-Js000.jpg "title=" 360 Feedback 1707121184112124.png "alt=" Wkiom1ybdjszziu9aaiekpsn-js000.jpg "/>


This article is from the "Wennuanyiran" blog, make sure to keep this source http://dingzhaoqiang.blog.51cto.com/5601059/1697136

3D Box Animation

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.