应为经常要写网站,导航部分基本一样,没必要每次都写一遍,下次直接来复制:

HTML:

<nav>
<div class="clearfix container">
<div class="nav_logo fl"><img src="data:images/logo_white.png" /></div>
<div class="fl">
<ul class="nav_bar clearfix">
<li><a href="#">首页</a></li>
<li class="menu_btn">
<a href="#">产品<span></span></a>
<ul class="nav_menu">
<li><a href="#">商城解决方案</a></li>
<li><a href="#">网络推广方案</a></li>
<li><a href="#">服务器租赁</a></li>
</ul>
</li>
<li><a href="#">微蜂营销</a></li>
<li><a href="#">移动支付</a></li>
<li><a href="#">服务</a></li>
<li><a href="#">联系方式</a></li>
</ul>
</div>
</div>
</nav>
<script src="js/jquery.min.js"></script>
<script>
$(function(){
$(".menu_btn").hover(function () {
$(this).children(".nav_menu").show();
}, function () {
$(this).children(".nav_menu").hide();
})
})
</script>

css:

/*global*/
@charset "utf-8";
/*CSS Reset*/
/*"微软雅黑","\5FAE\8F6F\96C5\9ED1","Microsoft YaHei"
"黑体","\9ED1\4F53"
"新宋体","\65B0\5B8B\4F53"
"宋体","\5B8B\4F53"
"幼圆" ,"YouYuan","\5E7C\5706"
*/
*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;word-wrap:break-all}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
body{min-height:100%;background-color:#fff;-webkit-font-26oothing:antialiased;-moz-osx-font-26oothing:grayscale;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}
body{font-family:Arial,'微软雅黑',"\5FAE\8F6F\96C5\9ED1","Microsoft Yahei","simsun","\5B8B\4F53","宋体","\65B0\5B8B\4F53","新宋体";font-size:14px;color: #444;}
html,body,h1,h2,h3,h4,h5,h6,dl,dt,dd,ul,ol,li,hr,p,pre,span,strong,form,iframe,label,button,input,textarea,table,tr,th,td,fieldset,i{margin:;padding:;text-align:left}
dl,dd,ol,ul,li{list-style:none;list-style-type:none}
div{text-align:left;margin-left:auto;margin-right:auto}
i{display:inline-block;font-style:normal;font-weight:normal;text-align:center;vertical-align:middle}
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:}
a,a:link,a:visited,a:hover,a:active,a:focus,input,button,textarea,select,optgroup,option,a:focus,input:focus,button:focus,textarea:focus,select:focus,optgroup:focus,option:focus,label,label:focus{outline:none;text-decoration:none;-webkit-tap-highlight-color:rgba(255,0,0,0);-webkit-appearance: none;}
img{width:100%;border:;vertical-align:middle}a img,img{-ms-interpolation-mode:bicubic}
a,a:link,a:visited{color:#333333;cursor:pointer}
a:hover,a:active{text-decoration:none}a.ie6:hover{zoom:}
button::-moz-focus-inner,input::-moz-focus-inner{padding:;border:}
input,button,textarea,select,optgroup,option{border:;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;overflow:visible;vertical-align:middle;outline:none;border-radius:;}
select {appearance:none;-moz-appearance:none;-webkit-appearance:none}select::-ms-expand { display: none; }select[multiple],select[size]{height:auto}
textarea{overflow-y:auto}
hr{height:;margin:15px 0;border:;border-top:1px solid #eee;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}
b,strong{font-weight:}
sub,sup{position:relative;font-size:75%;line-height:;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}
table{border-spacing:;border-collapse:collapse}
header,footer,section,aside,article,main,nav,menu,details,summary,address,hgroup,figure,figcaption,legend{display:block;margin:;padding:}
audio,canvas,progress,video{display:inline-block;*display:inline;*zoom:}
audio:not([controls]){display:none;height:}
legend{width:100%;margin-bottom:20px;font-size:21px;line-height:40px;border:;border-bottom:1px solid #e5e5e5}
time{display:inline}
svg:not(:root){overflow:hidden}
fieldset{padding:0.35em 0.625em 0.75em;margin:0 2px;border:1px solid #c0c0c0}
address,caption,cite,code,dfn,em,th,var{font-style:normal;font-weight:}
area{outline:none;blr:expression(this.onFocus=this.blur())}
[hidden],template{display:none}
abbr[title]{border-bottom:1px dotted}
dfn{font-style:italic}
mark{color:#000;background:#ff0}
small{font-size:80%}
figure{margin:1em 40px}
pre{overflow:auto}
code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}
/*通用属性*/ /*清除浮动*/
.clearfix{*zoom:;} /*解决ie6/7下面的浮动塌陷问题*/
.clearfix:before,
.clearfix:after{display:table; line-height:; content:" ";} /*display:table;解决其他下面的浮动塌陷问题,line-height是将添加的内容高度设为0;*/
.clearfix:after{clear: both;}/*清楚浮动*/
.fl{float:left;}.fr{float:right;} /*通用样式*/
.container{width:1200px;margin:0 auto;} /*导航*/
nav{background-color:#0da3f9;}
nav a,nav a:link,nav a:visited{display:block;color:#fff;line-height:80px;font-size:18px;padding:0px 30px;}
.nav_logo img{height:40px;width:auto;margin-top:20px;}
.nav_bar{padding-left:50px;}
.nav_bar li{float:left;}
.menu_btn{position:relative;}
.menu_btn span{display:inline-block;width:15px;height:15px;background:url(../images/down.png) center 2px no-repeat;background-size:100% 100%;margin-left:10px;}
.nav_menu{position:absolute;background-color:rgba(255,255,255,0.9);padding:10px 0px 10px 0px;right:0px;width:180px;display:none;}
.nav_menu li{display:block;float:none;}
.nav_menu a,.nav_menu a:link,.nav_menu a:visited{display:block;color:#333;line-height:40px;font-size:18px;padding:0px 20px;}
.nav_menu a:hover{background-color:#eaeaea;}

pc端常用导航的更多相关文章

  1. Unity3D 发布成PC端常用设置

    本文,基于Unity 5.6pro版本来发布PC端.文中若有不妥之处,欢迎各位指出! 一.如何去掉Unity官方水印? 首先,你需要pro版本的Unity3D.如果,你是personal版本的话,就需 ...

  2. pc端常用电脑屏幕 ((响应式PC端媒体查询)电脑屏幕分辨率尺寸大全)

    PC端************ 按屏幕宽度大小排序(主流的用橙色标明) 分辨率   比例 | 设备尺寸 1024*500 (8.9寸) 1024*768 (比例4:3  | 10.4寸.12.1寸.1 ...

  3. PC 端常用软件

    WPS  金山文档  有道云笔记  格式工厂 运行精灵 UC 遨游 360 Firefox 浏览器 光影魔术手 美图秀秀 2345好压 火绒安全软件 有道云笔记 悟空游戏厅 微信 QQ 迅雷 百度网盘 ...

  4. [应用][js+css3]3D盒子导航[PC端]

    CSS3构建的3D盒子之导航应用 1.在用css3构建的盒子表面,放上iframe,来加载导航页面. 2.鼠标左键按下移动可旋转盒子,寻找想要的网址. 3.左键单机盒子表面,将全屏现实所点盒子表面的网 ...

  5. bootstrap导航菜单,手机和PC端

    源代码 <!DOCTYPE html> <html> <head lang="en"> <meta name="viewport ...

  6. 滚动条大于120px时,判断pc端的情况下,导航条固定定位

      //滚动条大于120px时,判断pc端的情况下,导航条固定定位 $(window).scroll(function(){ var viewWidth=$(document).width() var ...

  7. 移动端和PC端页面常用的弹出层

    我们在页面的时候,很多时候用到了弹出层,消息提醒,确认框等等,统一样式的弹出框可以使页面更加优美.在此,我整理一下我们项目的移动端和PC端页面常用的弹出层. 一.移动端 我们需在页面引入弹出框的样式和 ...

  8. bootstrap导航栏PC端移动端之不同样式

    在此之前,我先说我之所以要改变网站PC移动双端不同样式的原因. 首先我的网站用到了bootstrap响应式布局,这是我网站的PC端导航栏: 这是我网站的移动端导航栏,看着就难受: 我用谷歌浏览器F12 ...

  9. 推荐常用的移动端、PC端、小程序的UI框架

    1.移动端UI库 ①.Vant UI 官方地址:https://youzan.github.io/vant/#/zh-CN/intro github地址:https://github.com/youz ...

随机推荐

  1. MFC中小笔记(二)

    6.有三个API函数可以运行可执行文件WinExec.ShellExecute和CreateProcess.  关于这三者的概述总结,有好几篇,自己选择. 1.CreateProcess因为使用复杂, ...

  2. ML笔记:Where does the error come from?

    error来自哪? 来自于偏差Bias和方差Variance. 就如打靶时瞄准一个点f平均,打出的点f星分布在该点周围. 该点与实际靶心f帽的距离就是偏差Bias, 打出的点与该点的分布距离就是方差V ...

  3. PAT乙级--1003

    1003. 我要通过!(20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue "答案正确"是 ...

  4. VSCode配置eslint

    在Vue.js项目中,使用的是eslint检查. 而在我写完代码后,cnpm run dev运行命令...然后悲剧了,一大堆报错!╮(╯▽╰)╭ 安装插件:Vetur:这是vscode上一个vue.j ...

  5. 二叉树的递归遍历 天平UVa839

    题意:输入一个树状的天平,利用杠杆原理,根据力矩是否相等(W1D1==W1D2)判断天平是否平衡 解题思路:1.由于判断天平是否平衡,当W1和W2都为0的时候,会先输入左子树,再输入右子树 2.此时的 ...

  6. 数据模型与查询语言 ------《Designing Data-Intensive Applications》读书笔记2

    数据模型是开发软件的最重要的部分,因为它们对应用程序有着深远的影响:不仅是软件的编写方式,而且也影响我们如何解决的问题的方式.第二篇读书笔记,我们聊一聊数据模型的设计. 1.数据模型的分层 作为一个开 ...

  7. sqlserver2005公布与订阅配置步骤

    1,新建公布 前提条件:第一要调通网络,在sqlserver configuration manager 中选择mssqlserver的协议把named pipes改为启用.第二要建立一个目录D:\b ...

  8. MySQL InnoDB四个事务级别 与 脏读、不反复读、幻读

    MySQL InnoDB事务隔离级别脏读.可反复读.幻读 希望通过本文.能够加深读者对ySQL InnoDB的四个事务隔离级别.以及脏读.不反复读.幻读的理解. MySQL InnoDB事务的隔离级别 ...

  9. HDOJ 题目3555 Bomb(数位DP)

    Bomb Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others) Total Subm ...

  10. Eclipse的Servers视图中无法加入Tomcat6/Tomcat7

    引言: 在基于Eclipse的开发过程中,出现了无法在Eclipse中加入Tomcat的问题,经过从网上搜索之后.找到了答案. 问题的提出: 无法从下面方式,加入Tomcatserver.  当中Se ...