本文摘自PHP中文网,作者不言,侵删。
本篇文章给大家带来的内容是关于CSS实现3D切换功能的代码示例,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | <!DOCTYPE html>
<html>
<head>
<title>Demo</title>
<style>
#app{
width : 100px ;
height : 35px ;
background-color : #006600 ;
text-align : center ;
line-height : 35px ;
position : relative ;
transform-style: preserve -3 d;
transition: all 0.3 s linear;
}
#app:hover{
transform: rotateX( 90 deg);
transition: all 0.3 s linear;
-webkit-transform-origin: 50% 0 ;
}
#app:before{
position : absolute ;
top : 100% ;
left : 0 ;
content : attr (data-hover);
width : 100px ;
height : 35px ;
transform: rotateX( -90 deg);
transition: all 0.3 s linear;
transform-origin: 50% 0 ;
text-align : center ;
line-height : 35px ;
background-color : red ;
}
</style>
<div>
<div id= "app" data-hover= "asdasdasd" >
asdasdasd
</div>
</div>
</body>
</html>
|
【相关推荐:CSS视频教程】
以上就是CSS实现3D切换功能的代码示例的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
css vertical-align属性怎么用
ie css背景图片不显示怎么办
css calc()有啥用
手把手教你使用css给html字体添加边框效果(代码分享)
chrome css加载不出来怎么办
aspx怎么引入css?
css a不换行怎么设置
css input怎么去掉边框
css hr是什么意思
详解css z-index的权重问题
更多相关阅读请进入《css》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » CSS实现3D切换功能的代码示例