资讯专栏INFORMATION COLUMN

js 3D旋转效果

番茄西红柿 / 3284人阅读

摘要:智慧园区微软雅黑

 


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"> <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: 100%; height: 100%; position: relative; -webkit-transform: translateZ(-288px); transform: translateZ(-288px); -webkit-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-transition: -webkit-transform 1s; transition: -webkit-transform 1s; transition: transform 1s; transition: transform 1s, -webkit-transform 1s; } .container .top .left .carousel__cell { position: absolute; width: 154px; height: 136px; left: 23px; top: 12px; -webkit-transition: opacity 1s, -webkit-transform 1s; transition: opacity 1s, -webkit-transform 1s; transition: transform 1s, opacity 1s; transition: transform 1s, opacity 1s, -webkit-transform 1s; -webkit-box-sizing: border-box; box-sizing: border-box; } .container .top .left .carousel__cell img { width: 100%; height: 100%; } .container .top .left .arrow-pre, .container .top .left .arrow-next { width: 43px; height: 43px; outline: none; border: none; /*background: url("../images/up.png");*/ background: red; background-size: 100% 100%; cursor: pointer; } .container .top .left .arrow-next { /*background: url("../images/down.png");*/ background: red; } .container .top .right { width: 520px; margin-left: 70px; height: 100%; overflow: hidden; } .container .top .right .swiper-container { height: 100%; } .container .top .right .swiper-container .swiper-slide { position: relative; } .container .top .right .swiper-container .swiper-slide h4 { font-size: 36px; color: #ffffff; margin-bottom: 20px; } .container .top .right .swiper-container .swiper-slide span { display: inline-block; height: 40px; line-height: 36px; text-align: center; padding: 0 20px;

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/1321.html

相关文章

  • CSS3旋转缩放移动倾斜等效果——transform

    摘要:可以将元素旋转,缩放,移动,倾斜等。通过设置轴的值来定义缩放转换。旋转,在参数中规定角度如。如下匀速时间效果如下下面主要介绍属性值的效果,所以都配合来使用吧,方便看看前后变化的不同。1.transform浏览器支持情况 也就是说目前不考虑老浏览器的话是不用加前缀的,感谢菜鸟教程:https://www.runoob.com/cssref/css3-pr-transform.html tra...

    hzc 评论0 收藏0
  • CSS3 变换

    摘要:概览变换也叫转换,主要包括以下几种旋转扭曲缩放和移动以及矩阵变形。变换没有扭曲操作,有移动,旋转,缩放。三,取消的变换,将变换应用到上并置于缩放前,改变缩放值,没有任何变化。 概览 CSS3 变换也叫 2D/3D转换,主要包括以下几种:旋转(rotate) 、扭曲 (skew) 、缩放(scale) 和 移动(translate) 以及 矩阵变形(matrix) 。transform ...

    wayneli 评论0 收藏0
  • 「移动设备陀螺仪」与「preserve-3d」碰撞的火花

    摘要:它描述的是设备由前向后旋转的情况。表示设备沿轴上的旋转角度,范围为度。完整的代码大概是这样庆祝时刻现在我们已经完成了,一个利用移动设备陀螺仪与实现的交互效果。 原文链接:航洋 blog 「移动设备陀螺仪」与「preserve-3d」碰撞的火花 涉及知识「CSS:transform、JS:deviceorientation」 废话不多,先上 DEMO「请使用移动设备查看」 如何搭建一个简...

    jsyzchen 评论0 收藏0
  • 「移动设备陀螺仪」与「preserve-3d」碰撞的火花

    摘要:它描述的是设备由前向后旋转的情况。表示设备沿轴上的旋转角度,范围为度。完整的代码大概是这样庆祝时刻现在我们已经完成了,一个利用移动设备陀螺仪与实现的交互效果。 原文链接:航洋 blog 「移动设备陀螺仪」与「preserve-3d」碰撞的火花 涉及知识「CSS:transform、JS:deviceorientation」 废话不多,先上 DEMO「请使用移动设备查看」 如何搭建一个简...

    cppowboy 评论0 收藏0
  • 带你玩转css3的3D

    摘要:透视即是以现实的视角来看屏幕上的事物,从而展现的效果。旋转则不再是平面上的旋转,而是三维坐标系的旋转,就包括轴,轴,轴旋转。必须与属性一同使用,而且只影响转换元素。可自由转载引用,但需署名作者且注明文章出处。 showImg(https://segmentfault.com/img/bVzJoZ); 话不多说,先上demo 酷炫css3走马灯/正方体动画: https://bupt-...

    Panda 评论0 收藏0
  • 带你玩转css3的3D

    摘要:透视即是以现实的视角来看屏幕上的事物,从而展现的效果。旋转则不再是平面上的旋转,而是三维坐标系的旋转,就包括轴,轴,轴旋转。必须与属性一同使用,而且只影响转换元素。可自由转载引用,但需署名作者且注明文章出处。 showImg(https://segmentfault.com/img/bVzJoZ); 话不多说,先上demo 酷炫css3走马灯/正方体动画: https://bupt-...

    archieyang 评论0 收藏0

发表评论

0条评论

最新活动
阅读需要支付1元查看
<