最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
CSS3如何实现图片抽屉式效果 CSS3实现图片抽屉式效果代码实例
时间:2022-06-25 14:14:50 编辑:袖梨 来源:一聚教程网
本篇文章小编给大家分享一下CSS3实现图片抽屉式效果代码实例,小编觉得挺不错的,现在分享给大家供大家参考,有需要的小伙伴们可以来看看。
图片效果图:
这个效果实现原理很简单:只要你掌握css3动画和过渡相关知识就行,不用js代码;
HTML代码:
CSS代码:
*{ margin:0;padding:0; }
ul{ list-style:none; }
a{ font-size:16px;text-decoration:none;color:#666; }
div{ margin:20px auto; }
#list li{ line-background:#efefef;text-indent:1em; margin-bottom:3px;overflow:hidden;-webkit-transition:height 0.3s ease;-moz-transition:height 0.3s ease-ms-transition:height 0.3s ease;-o-transition:height 0.3s ease;transition:height 0.3s ease;}
#list li img{ }
#list li:nth-child(1){background:#F36;}
#list li:nth-child(1) a{ color:#fff; }
#list:hover li{ background:#efefef; }
#list:hover li a{color:#666;}
#list li:hover{ background:#F36;}
#list li:hover a{ color:#fff; }
相关文章
- 虾米音乐如何恢复删除的歌单 05-27
- 恐龙神奇宝贝手游恐龙养成攻略 恐龙神奇宝贝手游新手恐龙培养与进阶技巧 05-27
- 全能扫描王使用操作相关问题详情 05-27
- 雷霆大战手游T0船长推荐 雷霆大战手游最强船长阵容与培养指南 05-27
- 铸兵之王开荒指南 铸兵之王新手入门全流程攻略 05-27
- 《快手》号修改方法 05-27
