This js special effect is implemented using a JS framework Aui-core + css3. You can zoom in when you scroll the scroll wheel, and the dice will gradually become deformed until you can see the world in the dice. The effect is very good, because css3 is used, do not use IE browsers to run netizens during browsing time. To make the netizens see the final effect, use Google, Firefox, and other browsing methods to open and run the program.
The CSS 3 style code is as follows:
#shadow { height:300px; width:600px; position:absolute; top:400px; left:0; z-index:0; background:-webkit-radial-gradient(center center , 150px 50px, #cfcfcf, #efefef ); background:-moz-radial-gradient(center center , 150px 50px, #cfcfcf, #efefef ); background:-ms-radial-gradient(center center , 150px 50px, #cfcfcf, #efefef ); background:-o-radial-gradient(center center , 150px 50px, #cfcfcf, #efefef ); background:radial-gradient(center center , 150px 50px, #cfcfcf, #efefef ); -webkit-transform:perspective(100px) rotateX(60deg) rotateY(0deg); -moz-transform:perspective(100px) rotateX(60deg) rotateY(0deg); -ms-transform:perspective(100px) rotateX(60deg) rotateY(0deg); -o-transform:perspective(100px) rotateX(60deg) rotateY(0deg); transform:perspective(100px) rotateX(60deg) rotateY(0deg); opacity:0;}#container { /*background:black;*/ height:240px; width:240px; position:absolute; top:180px; z-index:1; -webkit-transform-style:preserve-3d; -moz-transform-style:preserve-3d; -ms-transform-style:preserve-3d; -o-transform-style:preserve-3d; transform-style:preserve-3d; -webkit-transform:perspective(2000px) rotateX(-10deg) rotateY(45deg) ; -moz-transform:perspective(2000px) rotateX(-10deg) rotateY(45deg) ; -ms-transform:perspective(2000px) rotateX(-10deg) rotateY(45deg) ; -o-transform:perspective(2000px) rotateX(-10deg) rotateY(45deg) ; transform:perspective(2000px) rotateX(-10deg) rotateY(45deg) ;}#container p { position:absolute; top:40%; left:35%; padding:5px; word-spacing:0.2em; line-height:20px; background:black; color:#fff; text-align:center;}#container div { height:240px; width:240px; position:absolute; left:0; top:0; color:#fff; line-height:240px; text-align:center; font-weight:bold; font-size:80px; cursor:pointer; background:rgba( 239,239,239, 1 ); -webkit-transition:500ms all ease; -moz-transition:500ms all ease; -ms-transition:500ms all ease; -o-transition:500ms all ease; transition:500ms all ease;}#container div div { border:1px solid #fff; /* rgba( 255,255,255, 1 ) */ box-shadow:1px 0 3px #fff,1px 0px 10px #efefef; border-radius:8px; background:-webkit-radial-gradient(center, #d81002, #b20c00 ); background:-moz-radial-gradient(center, #d81002, #b20c00 ); background:-ms-radial-gradient(center, #d81002, #b20c00 ); background:-o-radial-gradient(center, #d81002, #b20c00 ); background:radial-gradient(center, #d81002, #b20c00 );}#container div div:hover { background:-webkit-radial-gradient(center, #f00, #b20c00 ); background:-moz-radial-gradient(center, #f00, #b20c00 ); background:-ms-radial-gradient(center, #f00, #b20c00 ); background:-o-radial-gradient(center, #f00, #b20c00 ); background:radial-gradient(center, #f00, #b20c00 );}#container div ul { list-style:none; margin:30px;}#container div li { width: 60px; height:60px; float:left; overflow:hidden; -webkit-transition:500ms all ease; -moz-transition:500ms all ease; -ms-transition:500ms all ease; -o-transition:500ms all ease; transition:500ms all ease;}#container div li span { width:50px; height:50px; margin:5px auto; display:block; background:-webkit-linear-gradient(top, #eee, #fff ); background:-moz-linear-gradient(top, #eee, #fff ); background:-ms-linear-gradient(top, #eee, #fff ); background:-o-linear-gradient(top, #eee, #fff ); background:linear-gradient(top, #eee, #fff ); border-radius:25px; box-shadow:-1px -1px 2px #000;}
The effect is as follows:
Demo address