css3动画垂直翻转180度
2016-09-13 15:51
344 查看
html代码
css
<ul class="flatflipbuttons"> <li><a href="http://www.w2bc.com" title="Search"><span class="icon-search"></span> </a><b>Search</b></li> <li><a href="http://www.w2bc.com"><span class="icon-gears"></span></a><b>Gears</b></li> <li><a href="http://www.w2bc.com"><span class="icon-rss"></span></a><b>RSS</b></li> <li><a href="http://www.w2bc.com"><span class="icon-twitter"></span></a><b>Twitter</b></li> <li><a href="http://www.w2bc.com"><span class="icon-rocket"></span></a><b>Rocket</b></li> </ul> <br /> <br /> <ul class="flatflipbuttons second"> <li><a href="http://www.w2bc.com"><span> <img src="imgs/rss-heart.png" /></span></a></li> <li><a href="http://www.w2bc.com"><span> <img src="imgs/twitter-heart.png" /></span></a></li> <li><a href="http://www.w2bc.com"><span> <img src="imgs/facebook-heart.png" /></span></a></li> <li><a href="http://www.w2bc.com"><span> <img src="imgs/google-heart.png" /></span></a></li> <li><a href="http://www.w2bc.com"><span> <img src="imgs/stumble-heart.png" /></span></a></li> 4000 </ul>
css
ul.flatflipbuttons { margin: 0; padding: 0; list-style: none; -webkit-perspective: 10000px; /* larger the value, the less pronounced the 3D effect */ -moz-perspective: 10000px; perspective: 10000px; } ul.flatflipbuttons li { margin: 0; display: inline-block; width: 100px; /* dimensions of buttons. */ height: 100px; margin-right: 15px; /* spacing between buttons */ background: white; text-transform: uppercase; text-align: center; } ul.flatflipbuttons li a { display: table; font: bold 36px Arial; /* font size, pertains to icon fonts specifically */ width: 100%; height: 100%; margin-bottom: 4px; color: black; background: #3B9DD5; text-decoration: none; outline: none; -webkit-transition: all 300ms ease-out; /* CSS3 transition. Last value is pause before transition play */ -moz-transition: all 300ms ease-out; transition: all 300ms ease-out; } ul.flatflipbuttons li:nth-of-type(1) a { color: white; background: #3B9DD5; } ul.flatflipbuttons li:nth-of-type(2) a { background: #A1CD3A; } ul.flatflipbuttons li:nth-of-type(3) a { background: #80C5EC; } ul.flatflipbuttons li:nth-of-type(4) a { color: white; background: #635746; } ul.flatflipbuttons li:nth-of-type(5) a { background: #F2C96D; } ul.flatflipbuttons li a span { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; display: table-cell; vertical-align: middle; width: 100%; height: 100%; -webkit-transition: all 300ms ease-out; /* CSS3 transition. */ -moz-transition: all 300ms ease-out; transition: all 300ms ease-out; } ul.flatflipbuttons li b { /* CSS for text beneath button */ display: block; position: relative; width: 100%; opacity: 0; -webkit-transition: all 300ms ease-out 0.2s; /* CSS3 transition. 0.2s delay */ -moz-transition: all 300ms ease-out 0.2s; transition: all 300ms ease-out 0.2s; } ul.flatflipbuttons li a img { /* CSS for image if defined inside button */ border-width: 0; vertical-align: middle; } ul.flatflipbuttons li:hover a { -webkit-transform: rotateY(180deg); /* flip horizontally 180deg*/ -moz-transform: rotateY(180deg); transform: rotateY(180deg); background: #c1e4ec; /* bgcolor of button onMouseover*/ -webkit-transition-delay: 0.2s; -moz-transition-delay: 0.2s; transition-delay: 0.2s; } ul.flatflipbuttons li:hover a span { color: black; /* color of icon font onMouseover */ -webkit-transform: rotateY(180deg); -moz-transform: rotateY(180deg); /* flip horizontally 180deg*/ transform: rotateY(180deg); -webkit-transition-delay: 0.2s; -moz-transition-delay: 0.2s; transition-delay: 0.2s; } ul.flatflipbuttons li:hover b { opacity: 1; } /* CSS for 2nd menu below specifically */ ul.second li a { background: #eee !important; } ul.second li a:hover { background: #ddd !important; }
相关文章推荐
- css3背景图水平垂直顺时针逆时针翻转旋转
- CSS3滤镜-水平和垂直翻转图片
- CSS3和js炫酷点击按钮3D翻转动画特效
- android:3D垂直翻转动画-FlipAnimation
- CSS3笔记:滚动、扭曲、旋转、翻转、动画练习整理
- 非常酷的CSS3垂直下拉动画菜单
- CSS3 动画:水平翻转
- CSS3制作3D轮播翻转动画示例
- Android动画--Activity界面180度翻转
- CSS3 实现导航菜单的 3D 翻转动画效果
- Swing之图片水平翻转、垂直翻转、180度旋转
- CSS3和js炫酷点击按钮3D翻转动画特效
- css3动画(图片翻转)
- 移动端垂直翻页+css3动画经验总结
- CSS3图片翻转动画技术详解
- 使用CSS3 BACKFACE-VISIBILITY属性制作翻转动画效果
- 纯CSS3 3D图片向上翻转渐隐消失动画DEMO演示
- android:3D垂直翻转动画-FlipAnimation
- 使用CSS3 backface-visibility:hidden;属性制作翻转动画效果
- 纯CSS3动画之上下翻转