css3 menu 手机菜单3
首先看一下效果图;
效果1,主要是 scale(0) -->scale(1px);opacity:0;—>opacity: 1; 然后递归延迟 怕麻烦也可以自己写个for循环
.five b {transform: scale(0); opacity: 0;}
.five:hover b {transform: scale(1); opacity: 1; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);}
.five i {transform: scale(0); opacity: 0;}
.five:hover i {transform: scale(1); opacity: 1; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);}
效果2,主要是 scale(1.5) -->scale(1px);opacity:0;—>opacity: 1;自己弄个cubic-bezier(0.175, 0.885, 0.32, 1.275);类似弹簧
.six a {transform: scale(1.5); opacity: 0;}
.six:hover a {transform: scale(1); opacity: 1; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);}
以下是源代码:
<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS3侧边栏菜单3</title>
<style type="text/css">
@import url(http://libs.useso.com/js/font-awesome/4.0.1/css/font-awesome.min.css);
@import url(http://fonts.useso.com/css?family=Montserrat);
* {margin: 0; padding: 0;}
ul,li {list-style-type: none;} h1{width:1450px;margin: 0 auto; height:80px; line-height:80px;} .grid {width:1500px;margin: 0 auto;}
.grid > li { width:320px; height: 480px; overflow: hidden; float: left; margin: 20px 0 20px 30px; position: relative; }
.grid > li:hover {box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.5);} .grid>li section {position: relative; transition: all 0.25s; width:320px; height:480px;}
.grid>li h2 {font: bold 14px montserrat; color: #eeeeee; text-transform: uppercase; position: absolute; text-align: center; width: 60%; left: 20%; top:48px; padding: 10px 0; border:1px solid white; border-radius: 4px;} .sidenav { position: absolute; top: 0; left: 0; bottom: 0; background: linear-gradient(rgba(50,60,60, 1), rgba(50,60,60, 0.7)); width: 50px; transition: all 0.25s; overflow: hidden; padding-top: 100px;}
.sidenav li { _overflow: hidden; width: 150px; }
.sidenav a { text-decoration: none; color: #eee; display: block; line-height: 48px; }
.sidenav span {display: block;}
.sidenav b { padding-left 10px; display: block; color: white; font-family: Montserrat; font-size: 12px; line-height: 4; opacity: 0; }
.sidenav a i { display: block; float: left; font-size: 16px; line-height: 48px; width: 50px; text-align: center; } /*All instances*/
section{ background:url(../../../images/TaylorSwift.jpg) no-repeat #333 center center /contain; height:500px;}
.grid>li:hover .sidenav {width: 150px;}
.grid>li:hover section {margin-left: 150px;
-webkit-filter: blur(1px); /* Chrome, Opera */
-moz-filter: blur(1px);/*火狐需要svg 实现*/
-ms-filter: blur(1px);
filter: blur(1px);}
.grid>li:hover b {opacity: 1;} .sidenav li:nth-child(1) b, .sidenav li:nth-child(1) a {transition-delay: .08s;}
.sidenav li:nth-child(2) b, .sidenav li:nth-child(2) a {transition-delay: .16s;}
.sidenav li:nth-child(3) b, .sidenav li:nth-child(3) a {transition-delay: .24s;}
.sidenav li:nth-child(4) b, .sidenav li:nth-child(4) a {transition-delay: .32s;}
.sidenav li:nth-child(5) b, .sidenav li:nth-child(5) a {transition-delay: .40s;}
.sidenav li:nth-child(6) b, .sidenav li:nth-child(6) a {transition-delay: .48s;} /*Five*/
.five b {transform: scale(0); opacity: 0;}
.five:hover b {transform: scale(1); opacity: 1; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);}
.five i {transform: scale(0); opacity: 0;}
.five:hover i {transform: scale(1); opacity: 1; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);} .sidenav li:nth-child(1) i {transition-delay: .48s;}
.sidenav li:nth-child(2) i {transition-delay: .40s;}
.sidenav li:nth-child(3) i {transition-delay: .32s;}
.sidenav li:nth-child(4) i {transition-delay: .24s;}
.sidenav li:nth-child(5) i {transition-delay: .16s;}
.sidenav li:nth-child(6) i {transition-delay: .08s;} /*Six*/
.six a {transform: scale(1.5); opacity: 0;}
.six:hover a {transform: scale(1); opacity: 1; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);}
</style>
<!--[if IE]>
<script src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script>
<![endif]-->
</head>
<body>
<h1>利用 scale </h1>
<ul class="grid">
<li class="five">
<ul class="sidenav">
<li><a><i class="fa fa-check"></i><b>由小放小</b></a></li>
<li><a><i class="fa fa-inbox"></i><b>Messages</b></a></li>
<li><a><i class="fa fa-pencil"></i><b>New Post</b></a></li>
<li><a><i class="fa fa-cog"></i><b>Settings</b></a></li>
<li><a><i class="fa fa-star"></i><b>Starred</b></a></li>
<li><a><i class="fa fa-power-off"></i><b>Logout</b></a></li>
</ul>
<section><h2>Ripple Effect</h2></section>
</li>
<li class="six">
<ul class="sidenav">
<li><a><i class="fa fa-check"></i><b>由大缩小</b></a></li>
<li><a><i class="fa fa-inbox"></i><b>Messages</b></a></li>
<li><a><i class="fa fa-pencil"></i><b>New Post</b></a></li>
<li><a><i class="fa fa-cog"></i><b>Settings</b></a></li>
<li><a><i class="fa fa-star"></i><b>Starred</b></a></li>
<li><a><i class="fa fa-power-off"></i><b>Logout</b></a></li>
</ul>
<section><h2>Scroll Down</h2></section>
</li>
</ul> </body>
</html>
css3 menu 手机菜单3的更多相关文章
- css3 menu 手机菜单1
首先看一下效果图; 效果1,主要是 translateY(100px) -->translateY(0px);opacity:0;—>opacity: 1; 然后递归延迟 怕麻烦也可以自己 ...
- css3实现手机菜单展开收起动画
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http ...
- jQuery手机菜单
效果展示 http://hovertree.com/texiao/nav/4/ 手机扫描二维码查看效果: 源码下载 http://hovertree.com/h/bjaf/kroft6c7.htm ...
- 24个 HTML5 & CSS3 下拉菜单效果及制作教程
下拉菜单是一个很常见的效果,在网站设计中被广泛使用.通过使用下拉菜单,设计者不仅可以在网站设计中营造出色的视觉吸引力,但也可以为网站提供了一个有效的导航方案.使用 HTML5 和 CSS3 可以更容易 ...
- 10个优秀的 HTML5 & CSS3 下拉菜单制作教程
下拉菜单是一个很常见的效果,在网站设计中被广泛使用.通过使用下拉菜单,设计者不仅可以在网站设计中营造出色的视觉吸引力,但也可以为网站提供了一个有效的导航方案.使用 HTML5 和 CSS3 可以更容易 ...
- 11个优秀的HTML5 & CSS3下拉菜单制作教程
下拉菜单是一个很常见的效果,在网站设计中被广泛使用.通过使用下拉菜单,设计者不仅可以在网站设计中营造出色的视觉吸引力,但也可以为网站提供了一个有效的导航方案.使用HTML5和CSS3可以更容易创造视觉 ...
- Android应用开发基础篇(10)-----Menu(菜单)
链接地址:http://www.cnblogs.com/lknlfy/archive/2012/02/28/2372101.html 一.概述 Menu,简单来理解就是当你按下手机的“menu”键时所 ...
- 10个优秀的 HTML5 & CSS3 下拉菜单制作教程
下拉菜单是一个非经常见的效果.在站点设计中被广泛使用.通过使用下拉菜单.设计者不仅能够在站点设计中营造出色的视觉吸引力,但也能够为站点提供了一个有效的导航方案.使用 HTML5 和 CSS3 能够更e ...
- Android Menu 主菜单是使用
在Android里面每个Activity都绑定了一个Menu(菜单)有些时候我们需要使用到菜单.用法很简单,我们只需要重写onCreateOptionsMenu和onOptionsItemSelect ...
随机推荐
- [WPF]DataGrid C#添加右键弹出选择菜单
private void dataGrid_MouseRightButtonDown(object sender, MouseButtonEventArgs e) { ContextMenu cont ...
- Core 1.0中的管道-中间件模式
ASP.NET Core 1.0中的管道-中间件模式 SP.NET Core 1.0借鉴了Katana项目的管道设计(Pipeline).日志记录.用户认证.MVC等模块都以中间件(Middlewar ...
- mysql按ID排序(转)
自己建表的时候,把一个字段类型创建为varchar(2) ,其实应该建为int(2)的. 因为我只允许输出数字.这本来也没什么,无非就是占点空间,懒得改了.但是今天在后台发现排序有问题.于是,没办法, ...
- WindowsPhone 在 根据公历 获取月球日期数据
WindowsPhone 在 根据公历 获取月球日期数据 WindowsPhone 在 它们的定义 类,根据公历 获取月球日期数据 using System; using System.Collect ...
- C++ 建设者继承
微通道公用号CodingRush 分享编程.算法.机器人leanring.数据挖掘.推荐系统.知识大数据计算框架,欢迎扫码关注. 子类继承了哪些东西? 子类在继承父类的时候,父类的public成员变量 ...
- 3D MAX脚本教程1
本文转载自http://jiurong995294.blog.163.com/blog/static/195133243201192531546490/ 方便以后须要时候使用 为什么要学习3D MAX ...
- linux kernel 结构体赋值方法{转载}
原文地址: http://www.chineselinuxuniversity.net/articles/48226.shtml 这几天看Linux的内核源码,突然看到init_pid_ns这个结构体 ...
- Spring的文件上传
Spring在发现包括multipart的请求后,会使用MultipartResolver的实现bean处理文件上传操作,现有採用Servlet3的 org.springframework.web.m ...
- 学习通过Thread+Handler实现非UI线程更新UI组件(转)
[Android线程机制] 出于性能考虑,Android的UI操作并不是线程安全的,这就意味着如果有多个线程并发操作UI组件,可能导致线程安全问题.为了解决这个问题,Android制定了一条简单的规则 ...
- 江湖急救篇:slave 复制错误
这样的事情是,我们DBA的一个暂时表,导致复制出错 老大给力,江湖救急. 关于该參数.淘宝丁奇写了篇文章还不错:MySQL小误区:关于set global sql_slave_skip_counter ...