Blogs实现导航菜单
#1、隐藏默认导航菜单
#header{display:none;} /*在页面定制CSS里面最前面添加如下代码,最好添加在最前面*/
#2、添加页首html代码
<!-- 添加博客导航栏信息开始-->
<div id="container">
<div id="logo"><a href="#"></a></div>
<div id="nav">
<div class="left"></div>
<div class="item">
<ul>
<li><a href="https://www.cnblogs.com/l75790/" class="p current">网站首页</a></li><li class="split" />
<li><a href="https://i-beta.cnblogs.com/posts/edit" class="p current">新随笔</a></li><li class="split" />
<li><a class="p" href="https://www.cnblogs.com/l75790/category/1485937.html" title="">Blogs优化</a></li><li class="split"> <li><a href="#" class="p">WP网站建设
<em><a href="https://www.cnblogs.com/l75790/category/1691404.html" title="">环境搭建</a>
<a href="#" title="">疑难杂症</a>
</em></a></li><li class="split" /> <li><a href="#" class="p">数据库知识
<em><a href="https://www.cnblogs.com/l75790/category/1754507.html" title="">MySQL</a>
<a href="#" title="">Oracle</a>
</em></a></li><li class="split" /> <li><a href="#" class="p">Linux运维
<em><a href="https://www.cnblogs.com/l75790/category/1247263.html" title="">命令基础</a>
<a href="#" title="">服务搭建</a>
<a href="https://www.cnblogs.com/l75790/category/1246694.html" title="">疑难杂症</a>
</em></a></li><li class="split" /> <li><a href="#" class="p">网络运维
<em><a href="https://www.cnblogs.com/l75790/category/1472868.html" title="">网络基础</a>
<a href="https://www.cnblogs.com/l75790/category/1481379.html" title="">网络管理</a>
</em></a></li><li class="split" /> <li><a class="p" href="https://i-beta.cnblogs.com/" title="">后台登录</a></li><li class="split">
<li><a class="p" href="#" title="" style="padding-right:10px;float: right">关于博主</a></li><li class="split">
</ul>
</div>
<div class="right"></div>
</div> <script type="text/javascript">
var _ntor = navigator.userAgent;
var otherNav = _ntor.indexOf("IE 7.0") != -1 || _ntor.indexOf("IE 6.0") != -1;
if (otherNav) {
$("a.p").mouseover(function () {
$("#nav li div").each(function () { this.parentNode.removeChild(this); });
var _html = this.getElementsByTagName('em')[0].innerHTML;
var _div = document.createElement("div");
_div.className = 'emp';
_div.innerHTML = _html;
/* _div.onmouseout = function () { this.parentNode.removeChild(_div); }*/
this.parentNode.appendChild(_div);
});
}
</script>
<!-- 添加博客导航栏信息结束-->
#3、添加定制css代码
/*头部导航栏CSS设置开始*/
#header{display:none;}
#nav{background:url(X) 0 -73px;height:41px; color:blue}
#nav div.left{float:left;width:2px;margin-right:2px;height:41px;background:red url(X) 0 -31px;}
#nav div.item{float:left;width:auto;margin:0 2px 0 2px;}
#nav div.right{float:right;width:2px;margin-left:-2px;height:41px;background:red url(X) -10px -31px;}
#nav div.item ul{list-style:none;margin:0;padding:0 10px;}#nav div.item li{float:left;position:relative;}
#nav div.item li.split{background:url(X) -12px -31px no-repeat;width:2px;height:41px;}
#nav a.p:link,#nav a.p:visited{padding:0 18px;line-height:41px;display:block;float:left;color:blue;text-decoration:none;font-weight:bold;font-size:14px;}
#nav a.p:hover,#nav a.current{background:url(X) 0 -115px no-repeat;zoom:1;}
#nav li em{display:none;font-style:normal;position:absolute;top:41px;background:#75B4D4;width:100px;overflow:hidden;}
#nav li:hover em{display:inherit;}
#nav a.p:hover em{display:inherit;}
#nav em a:link,#nav em a:visited{line-height:30px;font-size:12px;display:block;padding:0 8px;text-decoration:none;color:blue;border-bottom:dotted 1px White;}
#nav em a:hover{font-weight:bold;background:orange;}
/* IE6,7下用div显示 */
#nav div.emp{position:absolute;top:41px;left:0;background:#75B4D4;width:250px;}
#nav div.emp a:link,#nav div.emp a:visited{line-height:30px;font-size:12px;display:block;padding:0 8px;text-decoration:none;color:blue;border-bottom:dotted 1px White;}
#nav div.emp a:hover{font-weight:bold;background:orange;}
/*头部导航栏设置结束*/
Blogs实现导航菜单的更多相关文章
- CSS导航菜单水平居中的多种方法
CSS导航菜单水平居中的多种方法 在网页设计中,水平导航菜单使用是十分广泛的,在CSS样式中,我们一般会用Float元素或是「display:inline-block」来解决.而今天主要讲解如何让未知 ...
- php后管理分类导航菜单
<!DOCTYPE> <html> <head> <meta http-equiv="Content-type" content=&quo ...
- HTML+CSS代码橙色导航菜单
效果预览:http://hovertree.com/code/texiao/ks63r6aq.htm <!DOCTYPE html> <html xmlns="http:/ ...
- 使用 jQuery 和 CSS3 制作滑动导航菜单
这个下拉菜单可以让你的网站非常优雅,滑动框导航效果令人印象深刻.此外,子菜单框也可以与此集成起来以使其更具吸引力.导航是网站成功的关键之一,有吸引力的导航能够引导用户浏览网站中的更多内容. 效果演示 ...
- jq倾斜的动画导航菜单
效果预览网址:http://keleyi.com/keleyi/phtml/jqmenu/index.htm 支持IE.Chrome.火狐等浏览器 完整源代码,保存到HTML文件打开也可查看效果: & ...
- jquery和css3实现滑动导航菜单
效果预览:http://keleyi.com/keleyi/phtml/html5/15/ 有都中颜色可供选择,请使用支持HTML5/CSS3的浏览器访问. HTML源代码: <!DOCTYPE ...
- 仿腾讯QQ竖直滑动导航菜单
菜单就像qq软件的分组,鼠标经过自动显示相应组的内容. 效果体验网址:http://keleyi.com/a/bjad/nf86w2dv.htm 以下是源代码: <html> <he ...
- 前端框架bootstrap 表单和导航菜单的 Demo(第二篇)
表单: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <tit ...
- SharePoint 2013技巧分享系列 - 隐藏Blog和Apps左侧导航菜单
企业内部网中,不需要员工创建Blog或者创建,安装SharePoint应用,因此需要在员工个人Web页面需要隐藏Blog或者Apps导航菜单, 其步骤设置如下: 该技巧适合SharePoint 201 ...
随机推荐
- .nnmodel to .mlmodel
做项目时遇到.nnmodel 模型,不知道这是什么框架模型,没有头绪,抓住文件magic number是lzfse compressed, compressed tables. 在https://gi ...
- mysql建表和建数据库语句
一.数据库操作语言 数据库在操作时,需要使用专门的数据库操作规则和语法,这个语法就是 SQL(Structured Query Language) 结构化查询语言. SQL 的主要功能是和数据库建立连 ...
- Kubernetes中Service的使用
目录 简介 1. Service资源定义 1.1 Service Type ClusterIP 无头service NodePort sessionAffinity实现源地址session绑定 简介 ...
- ES6简单理解基本使用
let const 原来的var声明标识符:可以重复声明,编译不报错. let,const声明标识符:不能重复声明,再声明编译报错. var声明的标识符作用域是当前函数,let和const是当前{块} ...
- 老猿学5G扫盲贴:3GPP规范中部分与计费相关的规范序列文档
专栏:Python基础教程目录 专栏:使用PyQt开发图形界面Python应用 专栏:PyQt入门学习 老猿Python博文目录 老猿学5G博文目录 经咨询华为公司的相关专家,以及结合3GPP目录下载 ...
- Python中序列解包与函数的参数收集之间的关系
在<第4.7节 Python特色的序列解包.链式赋值.链式比较>中老猿介绍了序列解包,<第5.2节 Python中带星号的函数参数实现参数收集>介绍了函数的参数收集,实际上函数 ...
- PyQt(Python+Qt)学习随笔:gridLayout的layoutHorizontalSpacing和layoutVerticalSpacing属性
layoutHorizontalSpacing和layoutVerticalSpacing属性在Qt Designer中是网格布局(gridLayout)和表单布局(formLayout)都有的属性, ...
- Docker 安装-在centos7下安装Docker(二)
参考docker安装的方式: http://www.runoob.com/docker/centos-docker-install.html Docker中文官网安装步骤:https://docs.d ...
- 一台电脑上同时安装python2和python3
被python2的编码问题整的快晕了,python3对编码问题解决的不错 所以想安装下python3,但由于目前企业大多还是用python2,所以不想卸载2,让python2和python3共存. 本 ...
- CSP-S2020初赛游记
前一星期 感觉没怎么复习初赛啊,经常旷初赛练习赛--整天刷复赛题被老师怒斥了. zhoukangyang 天天做初赛(但是一天还是稳定做 \(2\) 道黑题),是不是要 AK 了啊(慌... 前一天 ...