之前为大家介绍了好几款导航菜单,今天再给大家带来一款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实现的幽灵按钮导航的更多相关文章

  1. 纯CSS3编写的面包屑导航收集

    整理了10个纯CSS3制作的面包屑导航,这些都是通过CSS3来编写,十分方便,而且实用.有些文章附有教程,大家可以研究学习一下. 漂亮面包屑导航 查看网站 扁平化面包屑导航 查看网站 圆形风格面包屑导 ...

  2. 一款纯css3实现的动画按钮

    今天给大家分享一款纯css3实现的动画按钮.第一排的按钮当鼠标经过的背景色动画切换,图标从右侧飞入,第二排的按钮当鼠标经过的时候边框动画切换,图标右侧飞入,效果非常好,一起看下效果图: 在线预览    ...

  3. 推荐10款纯css3实现的实用按钮

    在2014年的双11即将来临之季,爱编程小编为大家整理10款纯css3实现的按钮.希望这对坚守在前端的码农们有所帮助.亲,如果你有好的资源也可在本文留言,让从事编码的程序员们抱团.工作更轻松. No1 ...

  4. 一款简洁的纯css3代码实现的动画导航

    之前为大家介绍了好多导航菜单,今天给大家分享一款简洁的纯css3代码实现的动画导航.鼠标经过的时候以背景色以菱形渐变为长方形.效果图如下: 在线预览   源码下载 实现的代码. html代码: < ...

  5. 一款纯css3实现的响应式导航

    之前为大家介绍了好几款响应式导航.今天再给大家带来一款纯css3实现的响应式导航.这款导航还有个响应式的搜索框.废话少说,直接上图: 在线预览   源码下载 实现的代码. html代码: <di ...

  6. 纯css3实现的3D按钮

    前面已经为大家介绍了好多纯css3实现的按钮.今天要再给大家带来一款纯css3实现的3D按钮.在实例中给出了五种颜色的3D按钮.效果图如下: 在线预览   源码下载 实现的代码. html代码: &l ...

  7. 一款纯css3实现的翻转按钮

    之前为大家介绍了好多纯css3实现的很漂亮的按钮.今天小编要给各网友再分享一款纯css3实现的翻转按钮.实现中给出了两种的翻转特效,一种是基于按扭的左边缘为中心线,另一种是基于按钮的中间为中心线.我们 ...

  8. 纯css3实现的竖形二级导航

    之前为大家分享了好多导航菜单.今天给大家带来一款纯css3实现的竖形二级导航.这款导航菜单可以是无限级.一起看下效果图: 在线预览   源码下载 实现的代码. html代码: <div styl ...

  9. 纯CSS3彩色边线3D立体按钮制作教程

    原文:纯CSS3彩色边线3D立体按钮制作教程 今天我们来分享一款利用纯CSS3实现的3D按钮,这款按钮的一个特点是有彩色的边线,这让整个按钮显得比较多姿多彩,没那么枯燥无趣.本文不仅可以让大家看到演示 ...

随机推荐

  1. 转:eclipse里面显示中文乱码

    显示中文会变成乱码解决方案:Windows- >Pereferences- >General->Workspace- >Text   File   Encoding   选项下 ...

  2. kubernetes中使用NFS创建pv_pvc

    Persistent Volume(持久化卷)简称PV, 是一个K8S资源对象,我们可以单独创建一个PV, 它不和Pod直接发生关系, 而是通过 Persistent Volume Claim, 简称 ...

  3. JavaScript-实现滚动条

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  4. Linux-Linux下安装redis报错"undefined reference to__sync_add_and_fetch_4"解决办法

    如果出现这种错误可以在make的时候加上CFLAGS="-march=i686" 即 make CFLAGS="-march=i686" ----------- ...

  5. @Autowired(required = false)

    标记在 方法上的时候,它会根据类型去spring容器中寻找 对于的形参并且注入. @Repository(value="userDao") public class UserDao ...

  6. HDUOJ-----(1251)统计难题

    统计难题 Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131070/65535 K (Java/Others) Total Subm ...

  7. 苹果越狱后必备软件,总有你需要的!11月23日追加14个,支持【iOS4】

    http://bbs.dospy.com/thread-7398730-1-301-2.html越狱后必备软件,总有你需要的!11月23日追加14个,支持[iOS4]   背景自定义插件

  8. 【Linux】目录权限与文件权限

    现在我们知道了Linux系统内文件的三种身份(拥有者.群组与其他人),知道每种身份都有三种权限(rwx),已知道能够使用chown, chgrp, chmod去修改这些权限与属性,当然,利用ls -l ...

  9. Kafka日志清除策略

    一.更改日志输出级别 config/log4j.properties中日志的级别设置的是TRACE,在长时间运行过程中产生的日志大小吓人,所以如果没有特殊需求,强烈建议将其更改成INFO级别.具体修改 ...

  10. if you are not making someone else's life better, then you are wasting your time.– Will Smith如果你不能给别人的生活带来改善,那么你就是在浪费你的宝贵时间。 --威尔 史密斯(程序员,你做的东西...)

    if you are not making someone else's life better, then you are wasting your time. – Will Smith 如果你不能 ...