纯css3实现的幽灵按钮导航
之前为大家介绍了好几款导航菜单,今天再给大家带来一款css3实现的幽灵按钮式的导航菜单。导航界面非常好看。右侧是一个css3实现的动画消息图标。效果图如下:

实现代码:
html代码:
<header>
<nav>
<a>Home</a> <a>Words</a> <a>Activity</a> <a>Discussion</a> <a>Immersion</a>
</nav>
<button class="notif">
<span class="icon"></span>
</button>
</header>
css3代码:
* {
margin:;
padding:;
}
body {
background: #e9e9e9;
overflow: hidden;
}
header {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
background-color: #1CAFF6;
background-color: rgba(32, 166, 231, 0.8);
background-image: -webkit-gradient(linear, left top, left bottom, from(#20A8E9), to(rgba(30, 158, 220, 0.5)));
background-image: -webkit-linear-gradient(top, #20A8E9, rgba(30, 158, 220, 0.5));
background-image: linear-gradient(to bottom, #20A8E9, rgba(30, 158, 220, 0.5));
padding: 0 50px;
}
main {
background: white;
height: 100vh;
border-radius: 10px;
margin: 30px 55px;
background: 0 0 25px rgba(0, 0, 0, 0.04);
}
nav {
-webkit-box-flex:;
-webkit-flex:;
-ms-flex:;
flex:;
font: 500 15px/20px "museo-sans-rounded", sans-serif;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
overflow: hidden;
padding: 17px 0;
}
a {
display: inline-block;
padding: 10px 18px 8px;
margin: 0 2px;
border-radius: 100px;
color: white;
cursor: pointer;
-webkit-animation: nav-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1.1) backwards;
animation: nav-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1.1) backwards;
-webkit-transition: background 0.35s;
transition: background 0.35s;
}
a:hover {
background: #1493D1;
-webkit-transition:;
transition:;
}
a:active {
background: #107aad;
}
a:nth-child(1) {
-webkit-animation-delay: 0.46667s;
animation-delay: 0.46667s;
}
a:nth-child(2) {
-webkit-animation-delay: 0.58333s;
animation-delay: 0.58333s;
}
a:nth-child(3) {
-webkit-animation-delay: 0.7s;
animation-delay: 0.7s;
}
a:nth-child(4) {
-webkit-animation-delay: 0.81667s;
animation-delay: 0.81667s;
}
a:nth-child(5) {
-webkit-animation-delay: 0.93333s;
animation-delay: 0.93333s;
}
@-webkit-keyframes nav-in {
from {
-webkit-transform: translate3d(0px, 100px, 0);
transform: translate3d(0px, 100px, 0);
}
}
@keyframes nav-in {
from {
-webkit-transform: translate3d(0px, 100px, 0);
transform: translate3d(0px, 100px, 0);
}
}
.notif {
display: inline-block;
border-radius: 50%;
background: #1392D0;
padding: 7px 9px;
width: 40px;
height: 40px;
border:;
cursor: pointer;
-webkit-transition: 0.35s;
transition: 0.35s;
}
.notif:hover {
background: #0e6d9c;
-webkit-transition-duration: 0.0875s;
transition-duration: 0.0875s;
-webkit-transform: scale(1.1);
-ms-transform: scale(1.1);
transform: scale(1.1);
}
.notif:active, .notif:focus {
-webkit-transition-duration:;
transition-duration:;
-webkit-transform: scale(1.15);
-ms-transform: scale(1.15);
transform: scale(1.15);
background: #0b577c;
outline:;
}
.notif .icon {
display: inline-block;
width: 22px;
height: 26px;
background-image: url("icon.png");
-webkit-animation: notif 2s cubic-bezier(0.17, 0.67, 0.4, 1.17) infinite;
animation: notif 2s cubic-bezier(0.17, 0.67, 0.4, 1.17) infinite;
-webkit-background-size: 1000px 1000px;
background-size: 1000px 1000px;
background-position: -340px -40px;
}
@-webkit-keyframes notif {
10%, 30% {
-webkit-transform: rotate(-25deg);
transform: rotate(-25deg);
}
20%, 40% {
-webkit-transform: rotate(25deg);
transform: rotate(25deg);
}
50%, 100% {
-webkit-transform: none;
transform: none;
}
}
@keyframes notif {
10%, 30% {
-webkit-transform: rotate(-25deg);
transform: rotate(-25deg);
}
20%, 40% {
-webkit-transform: rotate(25deg);
transform: rotate(25deg);
}
50%, 100% {
-webkit-transform: none;
transform: none;
}
}
纯css3实现的幽灵按钮导航的更多相关文章
- 纯CSS3编写的面包屑导航收集
整理了10个纯CSS3制作的面包屑导航,这些都是通过CSS3来编写,十分方便,而且实用.有些文章附有教程,大家可以研究学习一下. 漂亮面包屑导航 查看网站 扁平化面包屑导航 查看网站 圆形风格面包屑导 ...
- 一款纯css3实现的动画按钮
今天给大家分享一款纯css3实现的动画按钮.第一排的按钮当鼠标经过的背景色动画切换,图标从右侧飞入,第二排的按钮当鼠标经过的时候边框动画切换,图标右侧飞入,效果非常好,一起看下效果图: 在线预览 ...
- 推荐10款纯css3实现的实用按钮
在2014年的双11即将来临之季,爱编程小编为大家整理10款纯css3实现的按钮.希望这对坚守在前端的码农们有所帮助.亲,如果你有好的资源也可在本文留言,让从事编码的程序员们抱团.工作更轻松. No1 ...
- 一款简洁的纯css3代码实现的动画导航
之前为大家介绍了好多导航菜单,今天给大家分享一款简洁的纯css3代码实现的动画导航.鼠标经过的时候以背景色以菱形渐变为长方形.效果图如下: 在线预览 源码下载 实现的代码. html代码: < ...
- 一款纯css3实现的响应式导航
之前为大家介绍了好几款响应式导航.今天再给大家带来一款纯css3实现的响应式导航.这款导航还有个响应式的搜索框.废话少说,直接上图: 在线预览 源码下载 实现的代码. html代码: <di ...
- 纯css3实现的3D按钮
前面已经为大家介绍了好多纯css3实现的按钮.今天要再给大家带来一款纯css3实现的3D按钮.在实例中给出了五种颜色的3D按钮.效果图如下: 在线预览 源码下载 实现的代码. html代码: &l ...
- 一款纯css3实现的翻转按钮
之前为大家介绍了好多纯css3实现的很漂亮的按钮.今天小编要给各网友再分享一款纯css3实现的翻转按钮.实现中给出了两种的翻转特效,一种是基于按扭的左边缘为中心线,另一种是基于按钮的中间为中心线.我们 ...
- 纯css3实现的竖形二级导航
之前为大家分享了好多导航菜单.今天给大家带来一款纯css3实现的竖形二级导航.这款导航菜单可以是无限级.一起看下效果图: 在线预览 源码下载 实现的代码. html代码: <div styl ...
- 纯CSS3彩色边线3D立体按钮制作教程
原文:纯CSS3彩色边线3D立体按钮制作教程 今天我们来分享一款利用纯CSS3实现的3D按钮,这款按钮的一个特点是有彩色的边线,这让整个按钮显得比较多姿多彩,没那么枯燥无趣.本文不仅可以让大家看到演示 ...
随机推荐
- Move semantics(C++11)
/* * Compile with: * g++ move_test.c -o move_test -std=c++11 -g -fno-elide-constructors * ...
- invalid configuration x86_64-unknown-linux-gnu' machine x86_64-unknown' not recognized
转载自:http://blog.csdn.net/php_boy/article/details/7382998 前两天在装机器软件的时候, 出现了下面的错误, invalid configurati ...
- MFC异常处理的问题
参考文献:http://technet.microsoft.com/zh-cn/library/t078xe4f(v=vs.85).aspx MFC中异常处理的语法和语义构建在标准C++异常处理语法和 ...
- 【java设计模式】之 责任链(chain of resposibility)模式
责任链模式,顾名思义,就是一条链.这个链到底是怎么运行的呢?它主要是将能够处理同一类请求的对象连成一条链,所提交的请求沿着链传递,链上的对象逐个判断是否有能力处理该请求,如果能则处理,如果不能则传递给 ...
- SDL 2.0 API by Category
Basics View information and functions related to... View the header Initialization and Shutdown SDL. ...
- 【js】批量判断表单中的文本框非空
方法一: <script type=”text/javascript”> /* * 批量验证表单非空 * 需要非空验证控件的样式class=”mustadd” */ $(".mu ...
- RHEL6.4 NFS文件共享服务器搭建
服务端:192.168.56.16客户端:192.168.56.17 服务端安装配置1.安装软件包 # yum install rpcbind nfs-utils 2.配置开机自启动 # chkcon ...
- http请求No peer certificate的解决方法
不少同学在做HTTP请求新浪授权或新浪数据的时候会出现 javax.net.ssl.SSLPeerUnverifiedException: No peer certificate的异常.现给出解决方法 ...
- 【转】谈“P=NP?”
“P=NP?” 通常被认为是计算机科学最重要的问题.有一个叫Clay Math的研究所,甚至悬赏 100 万美元给解决它的人.可是我今天要告诉你的是,这个问题其实是不存在的,它根本不需要解决. 我并不 ...
- VC编译错误: Nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12已经在dllmain.obj 中定义
错误: Nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12已经在dllmain.obj 中定义 解决: 打开项目属性对话框, C/C++ -& ...