您现在的位置是:网站首页> 编程资料编程资料
一款基于css3的列表toggle特效实例教程css3中transform属性实现的4种功能详解CSS3.0(Cascading Style Sheet) 层叠级联样式表纯CSS3实现div按照顺序出入效果CSS3实现列表无限滚动/轮播效果css3 利用transform-origin 实现圆点分布在大圆上布局及旋转特效CSS3实现的侧滑菜单CSS3实现的3D隧道效果用CSS3画一个爱心css3 实现文字闪烁效果的三种方式示例代码六种css3实现的边框过渡效果
2021-09-05
967人已围观
简介 之前介绍了css3的很多实例教程,今天给大家带来一款基于css3的列表toggle特效。右上角一个按钮,当列表不显示的时候,单击按钮列表动画出现,当列表显示时,单击按钮,列表动画消失
今天给大家带来一款基于css3的列表toggle特效。右上角一个按钮,当列表不显示的时候,单击按钮列表动画出现,当列表显示时,单击按钮,列表动画消失,效果图如下:
实现的代码。
htm代码:
复制内容到剪贴板
- class='menu'>
- toggle visibility
-
- class='list reverse'>
-
- class='item'>Item 1
-
- class='item'>Item 2
-
- class='item'>Item 3
-
- class='item'>Item 4
-
- class='item'>Item 5
-
- class='item'>Item 6
-
- class='item'>Item 7
-
- class='item'>Item 8
-
- class='item'>Item 9
-
- class='item'>Item 10
-
- class='item'>Item 11
-
- class='item'>Item 12
css3代码:
CSS Code复制内容到剪贴板
- * {
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- body {
- margin: 0;
- padding: 0;
- font-family: 'Avenir Next';
- background: #000;
- color: white;
- }
- .menu {
- background: tomato;
- padding: 20px;
- position: absolute;
- z-index: 1;
- height: 55px;
- top: 0;
- rightright: 50px;
- }
- .list {
- -webkit-perspective: 100vw;
- perspective: 100vw;
- width: 100vw;
- height: 100vh;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-flex-flow: column wrap;
- -ms-flex-flow: column wrap;
- flex-flow: column wrap;
- }
- .list.hidden {
- pointer-events: none;
- }
- .list.hidden .item {
- -webkit-animation: disappear both;
- animation: disappear both;
- -webkit-animation-direction: alternate;
- animation-direction: alternate;
- }
- .list.reverse {
- -webkit-flex-flow: row-reverse wrap-reverse;
- -ms-flex-flow: row-reverse wrap-reverse;
- flex-flow: row-reverse wrap-reverse;
- }
- .item {
- font-size: 30px;
- padding: 20px;
- height: 100px;
- width: calc(100vw / 3);
- height: calc(100vh / 4);
- -webkit-animation: appear both;
- animation: appear both;
- }
- .item:nth-child(1) {
- background: #008a8a;
- -webkit-animation-delay: 0.03333s !important;
- -webkit-animation-duration: 0.1s !important;
- }
- .item:nth-child(2) {
- background: #009494;
- -webkit-animation-delay: 0.06667s !important;
- -webkit-animation-duration: 0.2s !important;
- }
- .item:nth-child(3) {
- background: #009f9f;
- -webkit-animation-delay: 0.1s !important;
- -webkit-animation-duration: 0.3s !important;
- }
- .item:nth-child(4) {
- background: #00a9a9;
- -webkit-animation-delay: 0.13333s !important;
- -webkit-animation-duration: 0.4s !important;
- }
- .item:nth-child(5) {
- background: #00b3b3;
- -webkit-animation-delay: 0.16667s !important;
- -webkit-animation-duration: 0.5s !important;
- }
- .item:nth-child(6) {
- background: #00bdbd;
- -webkit-animation-delay: 0.2s !important;
- -webkit-animation-duration: 0.6s !important;
- }
- .item:nth-child(7) {
- background: #00c7c7;
- -webkit-animation-delay: 0.23333s !important;
- -webkit-animation-duration: 0.7s !important;
- }
- .item:nth-child(8) {
- background: #00d2d2;
- -webkit-animation-delay: 0.26667s !important;
- -webkit-animation-duration: 0.8s !important;
- }
- .item:nth-child(9) {
- background: #00dcdc;
- -webkit-animation-delay: 0.3s !important;
- -webkit-animation-duration: 0.9s !important;
- }
- .item:nth-child(10) {
- background: #00e6e6;
- -webkit-animation-delay: 0.33333s !important; <
相关内容
- CSS Hack详解CSS hack 针对IE6,IE7,firefox显示不同效果IE6/IE7/IE8/Firefox/Chrome/Safari的CSS hack兼容一览表纯CSS无hacks的跨游览器自适应高度多列布局 推荐纯CSS下拉菜单(无js,无hacks,支持IE6)css hack之清除浮动(clearfix) 不同浏览器的CSS Hack写法小结CSS 完美兼容IE6/IE7/FF的通用hack方法IE6789,FF之间Css Hack整理
- CSS实现段落首字母、首字放大特效CSS Transition通过改变Height实现展开收起元素从QQtabBar看css命名规范BEM的详细介绍css实现两栏布局,左侧固定宽,右侧自适应的多种方法CSS 实现Chrome标签栏的技巧CSS实现两列布局的N种方法CSS实现隐藏搜索框功能(动画正反向序列)CSS3中Animation实现简单的手指点击动画的示例详解CSS中的特指度和层叠问题详解overflow:hidden的作用(溢出隐藏、清除浮动、解决外边距塌陷)关于CSS浮动与取消浮动的问题
- 一款基于css3麻将筛子3D翻转特效的实例教程CSS实现卡片3D翻转效果的示例代码css3实现3D色子翻转特效css3的图形3d翻转效果应用示例简单几步用纯CSS3实现3D翻转效果
- CSS Grid布局教程之网格单元格布局CSS Grid布局教程之浏览器开启CSS Grid Layout汇总CSS Grid布局教程之什么是网格布局使用CSS Grid布局实现网格的流动css 限定GridView宽度并加上滚动条YUI 中的 Grids CSS值得关注和学习的-CSS教程-网页制作-网页教学网5分钟教你学会 CSS Grid 布局
- CSS Grid布局教程之浏览器开启CSS Grid Layout汇总CSS Grid布局教程之网格单元格布局CSS Grid布局教程之什么是网格布局使用CSS Grid布局实现网格的流动css 限定GridView宽度并加上滚动条YUI 中的 Grids CSS值得关注和学习的-CSS教程-网页制作-网页教学网5分钟教你学会 CSS Grid 布局
- CSS Grid布局教程之什么是网格布局CSS3中的display:grid,网格布局介绍js和CSS3实现带详情页面的炫酷网格布局特效CSS Grid 网格布局全解析CSS网格布局的示例代码在CSS网格布局中的列中填充项目的实现方法
- 使用CSS Grid布局实现网格的流动CSS Grid布局教程之网格单元格布局CSS Grid布局教程之浏览器开启CSS Grid Layout汇总CSS Grid布局教程之什么是网格布局css 限定GridView宽度并加上滚动条YUI 中的 Grids CSS值得关注和学习的-CSS教程-网页制作-网页教学网5分钟教你学会 CSS Grid 布局
- 纯css3制作网站后台管理面板ai怎么使用CSS属性面板?Dreamweaver中CSS面板该怎么设置?CSS 实现侧滑显示留言面板的网页组件功能
- 浅谈合理架构CSS纯CSS实现家谱树 组织架构树同理 代码分享我的css架构理念—因人而异 没有最优 只有适合
- CSS Sprite从大图中截取小图完整教程css sprites把很多小图集成在一张图片上CSS Sprites 样式生成工具 3.0CSS Sprites简介以及优缺点使用CSS sprite 的好处和坏处分析什么是CSS Sprites(图片合并)技术 图文介绍CSS Sprites详解css sprites技术 CSS Sprites图片切割术与图片优化深入理解浅谈CSS Sprites切图技术
点击排行
本栏推荐
