![如何利用CSS3制作简单的3d半透明立方体图片](https://1000zi.500zi.com/uploadfile/img/14/603/7e124916caef4b7e002a906d5b721143.jpg)
web前端|css教程
CSS3,3d半透明,立方体
web前端-css教程
这篇文章主要给大家介绍了利用CSS3制作简单的3d半透明立方体图片展示的相关资料,文中给出了完整的示例代码,对大家的理解和学习具有一定的参考价值,需要的朋友们下面来一起看看吧。
表白app源码,vscode查找整个文件夹,ubuntu 硬件流畅,tomcat开启异步io,python书城爬虫,github php爬虫,秦皇岛百度seo优化公司lzw
效果图如下:
大商创源码2.4.7,ubuntu粘贴后退出,查看tomcat运行时间,爬虫举报投诉,php人员外包哪家好,学校培训seolzw
08影院源码授权破解版,ubuntu调节声卡音量,tomcat怎么添加部署证,蝴蝶女爬虫,php 图片背景变透明,seo活动lzw
示例代码:
new document//css部分html{font-size:62.5%;}img{width:300px;height:300px;} #stage{//搭建一个舞台margin-top:200px;margin-left:auto;margin-right:auto;width:300px;height:300px;perspective:1200px;font-size:5em;font-weight:bold;color:#cc00ff;} .cube{//cube是正方体position:relative;transform:rotateX(-45deg) rotateY(45deg);transform-style:preserve-3d;transition: all .6s; } .side{color:blue;text-align:center;width:300px;height:300px;line-height:300px;position:absolute;background:#cc66ff;opacity:0.5;border:1px solid rgba(117,4,24,0.5);}//.front到.bottom是6个面分别进行旋转,构建出正方体的整形.front{transform:translateZ(150px);}.back{transform:rotateY(180deg) translateZ(150px);}.left{transform:rotateY(-90deg) translateZ(150px);}.right{transform:rotateY(90deg) translateZ(150px);}.top{transform:rotateX(90deg) translateZ(150px);}.bottom{transform:rotatex(-90deg) translateZ(150px);}#stage:hover .cube{//设置鼠标移上正方体时是否需要过渡效果以及过渡效果开始和结束的时间和速度transform:rotateX(-45deg) rotateY(225deg);transition:transform .6s;}