最新下载
热门教程
- 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; }
相关文章
- LM Studio 在 Windows 下载安装以及首个模型导入教程 07-21
- GitHub Copilot CLI 安装与登录教程 07-21
- ChatGPT Windows 桌面版安装下载教程 07-21
- 诡秘之主双端互通吗 诡秘之主游戏是不是双端互通 07-21
- ComfyUI Desktop 在 macOS 安装与首次启动教程 07-21
- ComfyUI 更新升级指南 07-21
