js 3D旋转效果

Posted 小角色Byme

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了js 3D旋转效果相关的知识,希望对你有一定的参考价值。

 


<!
DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>智慧园区</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" /> <link rel="stylesheet" href="http://61.174.54.120:9000/static/home/css/swiper.min.css"> <!-- <link rel="stylesheet" href="http://61.174.54.120:9000/static/home/css/index.css"> --> <style> html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, menu, nav, output, ruby, section, summary, time, mark, audio, video, input { margin: 0; padding: 0; border: 0; font-size: 100%; font-weight: normal; vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, menu, nav, section { display: block; } html, body { width: 100%; height: 100%; } body { line-height: 1; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: none; } table { border-collapse: collapse; border-spacing: 0; } /* custom */ a { color: #7e8c8d; -webkit-backface-visibility: hidden; text-decoration: none; } li { list-style: none; } body { -webkit-text-size-adjust: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .ellipsis { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } body { background-color: #000; font-family: "Microsoft Yahei"; } .container { position: relative; width: 100%; height: 100%; min-width: 1366px; min-height: 768px; overflow: hidden; /*background: url("../images/bg.png");*/ background:black; background-size: cover; transform-origin: 0 0; -ms-transform-origin: 0 0; -webkit-transform-origin: 0 0; -moz-transform-origin: 0 0; -o-transform-origin: 0 0; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } .container .header { position: absolute; width: 100%; height: 60px; top: 0; left: 0; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; -webkit-box-align: center; -ms-flex-align: center; align-items: center; background: url("../images/title.png") no-repeat center top/1366px auto; } .container .headWord { position: absolute; width: 100%; height: 60px; top: 0; left: 0; font: 24px "微软雅黑"; font-weight: bold; color: #fff; text-align: center; text-align: -webkit-center; line-height: 60px; letter-spacing: 2px; } .container .header h2 { padding-left: 60px; font-size: 54px; color: #ffffff; } .container .header .right { position: absolute; top: 17px; right: 13px; height: 24px; line-height: 24px; display: -webkit-box; display: -ms-flexbox; display: flex; } .container .header .right a { font-size: 16px; color: #ffffff; margin-right: 10px; padding-left: 20px; background: url("../images/icon_exit.png") no-repeat left center/auto 16px; } .container .header .right .qr { position: relative; font-size: 16px; color: #ffffff; margin-right: 35px; cursor: pointer; } .container .header .right .qr:hover div { display: block; } .container .header .right .qr span { padding-left: 20px; background: url("../images/icon_app.png") no-repeat left center/auto 16px; } .container .header .right .qr div { position: absolute; display: none; top: 30px; left: 0; width: 100px; height: 100px; padding: 5px; background-color: #fff; -webkit-transition: all 1s ease 0s; transition: all 1s ease 0s; } .container .header .right .qr div img { width: 100%; height: 100%; } .container .top { position: relative; z-index: 20; display: -webkit-box; display: -ms-flexbox; display: flex; height: 350px; -webkit-box-sizing: border-box; box-sizing: border-box; top: -60px; } .container .top .left { width: 370px; position: relative; margin-right: 30px; -webkit-box-sizing: border-box; box-sizing: border-box; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; } .container .top .left .scene { position: relative; width: 200px; height: 160px; -webkit-perspective: 1000px; perspective: 1000px; } .container .top .left .carousel { width以上是关于js 3D旋转效果的主要内容,如果未能解决你的问题,请参考以下文章

使用纯CSS代码实现3D旋转效果

jQuery仿3D旋转木马效果插件(带索引按钮)

HTML+CSS+JS实现 ❤️3D旋转魔方图片相册特效❤️

网页3D效果库Three.js初窥

解惑:如何使用html+css+js实现旋转相册,立方体相册等动画效果

HTML+CSS+JS实现 ❤️爱心文字3D旋转动画特效❤️