css3实现手机qq空间菜单按钮
工作之余写的一个类似于QQzone的菜单效果
先上截图:
图一为点击按钮前界面:
图二为点击按钮后的界面

下面上代码:
<!--css部分-->
<style type="text/css">
@font-face
{
font-family:'Raphaelicons';
src:url(font/raphaelicons-webfont.svg) format('svg'),url(font/raphaelicons-webfont.woff) format('woff');
font-weight:normal;
}
*
{margin:;
padding:;
border:;
list-style:none;
}
html, body, #container
{
width:%;
height:%;
overflow:hidden;
}
#container
{
background:#;
overflow-y:auto;
} [data-icon]:after
{
font-family:Raphaelicons;
content:attr(data-icon);
width:50px;
height:50px;
} .st-icon, .nav
{
position:absolute;
width:50px;
height:50px;
bottom:;
left:%;
margin-left:-25px; }
.st-icon
{
text-align:center;
font-size:50px;
line-height:50px;
-webkit-border-radius:%;
border-radius:%;
background-color:#F90;
color:white;
-webkit-transition:all 1s ease-in-out;
transition:all .7s ease-in-out;
z-index:;
}
.nav
{
z-index:;
opacity: ;
filter: 'alpha(opacity=50)';
cursor:pointer;
}
.nav:checked + .st-icon
{
-webkit-transform:rotateZ(135deg);
transform:rotateZ(135deg);
}
.cover
{ background:rgba(,,,.);
position:absolute;
width:%;
height:%;
bottom:-%;
left:;
-webkit-transition:all .5s ease-in-out;
transition:all .6s ease-in-out;
}
.nav:checked ~ .cover
{
bottom:;
} .ope-group
{
position:absolute;
bottom:100px;
left:;
right:;
padding-left:20px; }
.ope-group li
{
float:left;
margin-right:20px;
text-align:center;
margin-bottom:10px;
}
.ope-name
{
font-size:7px;
} .nav:checked ~ .cover li#opeItem1
{
-webkit-animation:moveUp .3s ease-in-out .1s backwards;
animation:moveUp .3s ease-in-out .1s backwards;
}
.nav ~ .cover li#opeItem1, .nav ~ .cover li#opeItem2, .nav ~ .cover li#opeItem3, .nav ~ .cover li#opeItem4
{
-webkit-animation:moveDown .2s ease-out .2s backwards;
animation:moveDown .2s ease-out .2s backwards;
}
.nav ~ .cover li#opeItem5, .nav ~ .cover li#opeItem6
{ -webkit-animation:moveDown .2s ease-out .1s backwards;
animation:moveDown .2s ease-out .1s backwards;
}
.nav:checked ~ .cover li#opeItem2
{
-webkit-animation:moveUp .3s ease-in-out .2s backwards;
animation:moveUp .3s ease-in-out .2s backwards;
}
.nav:checked ~ .cover li#opeItem3
{
-webkit-animation:moveUp .3s ease-in-out .3s backwards;
animation:moveUp .3s ease-in-out .3s backwards;
}
.nav:checked ~ .cover li#opeItem4
{
-webkit-animation:moveUp .3s ease-in-out .4s backwards;
animation:moveUp .3s ease-in-out .4s backwards;
}
.nav:checked ~ .cover li#opeItem5
{
-webkit-animation:moveUp .3s ease-in-out .5s backwards;
animation:moveUp .3s ease-in-out .5s backwards;
}
.nav:checked ~ .cover li#opeItem6
{
-webkit-animation:moveUp .3s ease-in-out .5s backwards;
animation:moveUp .3s ease-in-out .5s backwards;
}
@-webkit-keyframes moveUp
{
%
{
-webkit-transform:translateY(200px);
-moz-opacity: ;
opacity: ;
}
%
{
-webkit-transform:translateY(0px);
-moz-opacity: ;
opacity: ;
}
}
@keyframes moveUp
{
%
{
transform:translateY(-200px);
-moz-opacity: ;
opacity: ;
}
%
{
transform:translateY(0px);
-moz-opacity: ;
opacity: ;
}
}
@-webkit-keyframes moveDown
{
%
{
-webkit-transform:translateY(200px);
-moz-opacity: ;
opacity: ;
}
%
{
-webkit-transform:translateY(0px);
-moz-opacity: ;
opacity: ;
}
}
@keyframes moveDown
{
%
{
transform:translateY(-200px);
-moz-opacity: ;
opacity: ;
}
%
{
transform:translateY(0px);
-moz-opacity: ;
opacity: ;
}
} .st-list
{
width:300px;
background:#FFF;
margin-left:auto;
margin-right:auto;
margin-bottom:20px;
padding:5px; }
.st-list .st-avatar
{
-webkit-border-radius:%;
float:left;
padding:5px;
box-shadow:2px 2px 10px;
width:50px;
}
.st-list .st-detail
{
margin-left:100px;
} .st-list
{
box-shadow:1px 1px 1px;
} </style>
<!--html部分-->
<body onmousewheel="return false;">
<div id="container">
<div class="st-list">
<img class="st-avatar" src="http://pic.cnblogs.com/avatar/595478/20140712113054.png"/>
<div class="st-detail">
<h3>工作标题</h3>
<p class="st-content">今天的工作内容今天的工作内容今天的工作内容今天的工作内容</p>
</div>
</div>
<div class="st-list">
<img class="st-avatar" src="http://pic.cnblogs.com/avatar/595478/20140712113054.png"/>
<div class="st-detail">
<h3>工作标题</h3>
<p class="st-content">今天的工作内容今天的工作内容今天的工作内容今天的工作内容</p>
</div>
</div>
<div class="st-list">
<img class="st-avatar" src="http://pic.cnblogs.com/avatar/595478/20140712113054.png"/>
<div class="st-detail">
<h3>工作标题</h3>
<p class="st-content">今天的工作内容今天的工作内容今天的工作内容今天的工作内容</p>
</div>
</div>
<div class="st-list">
<img class="st-avatar" src="http://pic.cnblogs.com/avatar/595478/20140712113054.png"/>
<div class="st-detail">
<h3>工作标题</h3>
<p class="st-content">今天的工作内容今天的工作内容今天的工作内容今天的工作内容</p>
</div>
</div> <input class="nav" type="checkbox"/>
<div class="st-icon" data-icon=""></div>
<div class="cover">
<ul class="ope-group">
<li id="opeItem1"><img src="data:images/参数管理.png" /><br/><span class="ope-name">参数管理</span></li>
<li id="opeItem2"><img src="data:images/订单申请.png" /><br/><span class="ope-name">订单申请</span></li>
<li id="opeItem3"><img src="data:images/订单审核.png" /><br/><span class="ope-name">订单审核</span></li>
<li id="opeItem4"><img src="data:images/经销商库存查询.png" /><br/><span class="ope-name">库存查询</span></li>
<li id="opeItem5"><img src="data:images/收货入库.png" /><br/><span class="ope-name">收货入库</span></li>
<li id="opeItem6"><img src="data:images/角色权限管理.png" /><br/><span class="ope-name">权限管理</span></li>
</ul>
</div>
</div>
</body>
ps:由于本人并非美工出生,所以界面效果也只是简单的实现了一下效果,上面基本上是所有的代码,并未用到任何js代码,既然是css3低版本的浏览器肯定就down了。。 项目在github上面 https://github.com/wdxlwx/qqzonemenu
css3实现手机qq空间菜单按钮的更多相关文章
- 再造 “手机QQ” 侧滑菜单(三)——视图联动
代码示例:https://github.com/johnlui/SwiftSideslipLikeQQ 本 文中,我们将一起使用 UINavigationController 来管理主视图,并实现点击 ...
- 手机QQ空间自动点赞登录
学以致用~使用 Appium 模拟人类操控手机行为 V2.0在手机上运行,目前实现以下功能: 1.小黑屋模式,一分钟内给好友发100条消息然后进了好友的小黑屋 2.定时发消息提醒对象多喝热水~ 3.对 ...
- 再造 “手机QQ” 侧滑菜单(一)——实现侧滑效果
本系列文章中,我们将尝试再造手机QQ的侧滑菜单,力争最大限度接近手Q的实际效果,并使用 Auto Layout 仿造左侧菜单,实现和主视图的联动. 代码示例:https://github.com/jo ...
- 【CSS3】精美横向滚动菜单按钮
废话不多说,直接上图: 然后是代码: <!DOCTYPE html> <html> <head> <meta charset="utf-8" ...
- 实现“手机qq”侧滑菜单 -- 吴欧
基本数据采集 经过体验,手机QQ采用的应该是线性动画,即视图缩放比例等随手指在屏幕上滑动的距离以一次方程的形式变化. 提取基本数据,向右侧滑达到最大幅度时: 1. 右侧主视图左边界距离屏幕左边界的 ...
- 08. Web大前端时代之:HTML5+CSS3入门系列 ~ QQ空间时间轴
Web大前端时代之:HTML5+CSS3入门系列:http://www.cnblogs.com/dunitian/p/5121725.html 大前端系列,主要就是使用CSS3.0来实现,注释我已经打 ...
- 再造 “手机QQ” 侧滑菜单(二)——高仿左视图
代码示例:https://github.com/johnlui/SwiftSideslipLikeQQ 本篇文章中,我们将一起使用 Auto Layout 高仿手Q的左侧视图,力争达成从布局到动画的全 ...
- 模仿手机qq空间头部向上滚动颜色加深
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 技术揭秘“QQ空间”自动转发不良信息
大家经常会看到QQ空间自动转发一些附带链接的不良信息,即便我们的QQ密码并没有被盗取.最近通过对一个QQ空间自动转发链接进行分析,发现该自动转发机制通过利用腾讯网站存在漏洞的页面,精心构造出利用代码获 ...
随机推荐
- Alert方法重写
在正规项目中,总感觉alert框是非常难看的,但是有的时候又必须添加alert框来给用户一种警醒,废话不多说,先上图
- DAO 基础学习笔记
一.DAO 1.概念: (1)Date Access Object(数据存取对象) (2)位于业务逻辑和持久化数据之间 (3)实现对持久化数据的访问 (4)类---> DAO --->数据 ...
- [LA] 3027 - Corporative Network [并查集]
A very big corporation is developing its corporative network. In the beginning each of the N enterpr ...
- 让libvirt支持win7运行2核以上
现在人在部署OpenStack之后会发现按照配额运行Linux的虚拟机没有问题,但是运行windows的虚拟机会发现如果配置2个以上的核则无法识别,windows server也最多支持到4个核.无法 ...
- LeetCode_Populating Next Right Pointers in Each Node II
Follow up for problem "Populating Next Right Pointers in Each Node". What if the given tre ...
- Auto Install Workflow Manager 1.0
Write-Host "- Begining Download Service Bus..." Start /W "c:\Program Files\Microsoft\ ...
- centos 图形界面和命令行界面切换
如果在图形界面下,按:Ctrl+Alt+F2进入命令行登录界面 切到root用户下, su root password 1, 关闭图形界面: init 3 关闭图形界面(XServer服务也会关闭) ...
- Java获取当前日期的前一个月,前一天的时间
Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.DATE, -); //得到前一天 calendar.add(Cal ...
- 10.1.5 Connection Character Sets and Collations
10.1.5 Connection Character Sets and Collations Several character set and collation system variables ...
- html 表单初步学习
<html> <head> <title> 静态页面</title> </head> <body> 这是一个静态页面<br ...