您现在的位置是:网站首页> 编程资料编程资料

CSS3实现图片抽屉式效果的示例代码css3中transform属性实现的4种功能详解CSS3.0(Cascading Style Sheet) 层叠级联样式表纯CSS3实现div按照顺序出入效果CSS3实现列表无限滚动/轮播效果css3 利用transform-origin 实现圆点分布在大圆上布局及旋转特效CSS3实现的侧滑菜单CSS3实现的3D隧道效果用CSS3画一个爱心css3 实现文字闪烁效果的三种方式示例代码六种css3实现的边框过渡效果

2023-10-19 337人已围观

简介 这篇文章主要介绍了CSS3实现图片抽屉式效果的示例代码,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

老规矩,先放图片效果图: 

这个效果实现原理很简单:只要你掌握css3动画和过渡相关知识就行,不用js代码;

HTML代码:

CSS代码:

 *{ margin:0;padding:0; } ul{ list-style:none; } a{ font-size:16px;text-decoration:none;color:#666; } div{ width:300px;margin:20px auto; } #list li{ line-height:40px;height:40px;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{ width:300px;height:200px;} #list li:nth-child(1){height:240px;background:#F36;} #list li:nth-child(1) a{ color:#fff; } #list:hover li{ height:40px;background:#efefef; } #list:hover li a{color:#666;} #list li:hover{ height:240px; background:#F36;} #list li:hover a{ color:#fff; } 

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

-六神源码网