2019独角兽企业重金招聘Python工程师标准>>> hot3.png

<html5>
<head>
</head>
<style type="text/css">
/*
Highlighting the current page in a nav bar
*/
/*
To highlight the current page, you simply target the following combination of IDs and class
names:
*/
#home .nav .home a,
#about .nav .about a ,
#news .nav .news a,
#products .nav .products a,
#services .nav .services a {
background-position: right bottom;
color: #fff;
cursor: default;
}
/*
When the user is on the home page, the nav item with a class of home will display the selected
state, whereas on the news page, the nav item with the class of news will show the selected state.
For added effect, I have changed to cursor style to show the default arrow cursor. That way, if
you mouse over the selected link, your cursor will not change state and you won’t be tempted to
click a link to a page you are already on.
*/
</style><body>
<!--In the previous vertical nav bar example, I used a class to indicate the current page. For small
sites with the navigation embedded in the page, you can simply add the class on a page-by-page
basis. For large sites, there is a good chance that the navigation is being built dynamically, in
which case the class can be added on the back end. However, for medium-sized sites, where the
main navigation doesn’t change, it is common to include the navigation as an external file. In
these situations, wouldn't it be good if there were a way to highlight the page you are on, without
having to dynamically add a class to the menu? Well, with CSS there is.
This concept works by adding an ID or a class name to the body element of each page, denoting
which page or section the user is in. You then add a corresponding ID or class name to each item
in your navigation list. The unique combination of body ID and list ID/class can be used to
highlight your current section or page in the site nav.
Take the following HTML fragment as an example. The current page is the home page, as
indicated by an ID of home on the body. Each list item in the main navigation is given a class
name based on the name of the page the list item relates to.-->
<body id="home">
<ul class="nav">
<li><a href="home.htm">Home</a></li>
<li><a href="about.htm">About</a></li>
<li><a href="services.htm">Our Services</a></li>
<li><a href="work.htm">Our Work</a></li>
<li><a href="news.htm">News</a></li>
<li><a href="contact.htm">Contact</a></li>
</ul>
</body>
</html5>

转载于:https://my.oschina.net/LosersAFC/blog/213262

CSS-home.htm相关推荐

  1. (四)学习CSS之position、bottom、left、right和top属性

    参考:http://www.w3school.com.cn/cssref/pr_class_position.asp position 属性规定元素的定位类型. 这个属性定义建立元素布局所用的定位机制 ...

  2. 纯HTML+CSS带说明的黄色导航菜单

    HoverTree带说明的CSS菜单:纯HTML+CSS结构链接带说明的黄色导航 在线体验效果:http://hovertree.com/texiao/css/1.htm 代码如下,保存到HTML文件 ...

  3. firework 怎么导出html,由Fireworks导出的htm生成imageset文件

    在游戏制作中,需要将界面图形元素保存到一幅png图像中,然后在xml格式的imageset文件中指出每个元素的位置和大小,方便游戏程序加载使用. 这里将Fireworks切成很多小的图层导出为CSS的 ...

  4. css取li的点,CSS 去掉点li 的点

    转:http://blog.sina.com.cn/s/blog_63b13c300100jyek.html 方法一: 百度 雅虎 新浪 谷歌 方法二: li {list-style-type:non ...

  5. 【VS实践】如何在vs中自动添加注释

    前言: 之前看别人博客关于在vs中添加类注释的,今天自己看到牛腩里的讲述,也就跟着试了试,牛腩有点out了,跟着他的视频,自己还给建错了,找了找原因,也意外的开辟了新大陆! 步骤: 1. 我的vs是2 ...

  6. yum安装nginx+PHP+Mysql

    #mkdir /var/www/yum_repo 1.nginx安装: 在http://nginx.org/en/linux_packages.html#stable中下载CentOSX对应版本的rp ...

  7. 多学一点(八)——LNMP环境搭建

    在之前的博客中虽然已经总结过了 MySQL 和 Apache 的安装.配置,但分开总结总是不太系统,这篇博客将会对LNMP(Linux + Nginx + MySQL +PHP)做一个比较系统的总结. ...

  8. Linux -nginx-源码安装

    1.wget http://nginx.org/download/nginx-1.14.0.tar.gz 2.tar zxvf nginx-1.14.0.tar.gz 查看源码文件:/nginx/sr ...

  9. LNMP_ 配置文件

    vim /usr/local/nginx/conf/nginx.conf //清空原来的配置,加入如下内容: user nobody nobody; worker_processes 2; error ...

  10. LNMP之 nginx 启动脚本和配置文件

    因为 nginx 启动不方便,所以我们需要自已手动来编译一个nginx 的启动脚本 [root@LNMP ~]# vim /etc/init.d/nginx  #加入以下内容 #!/bin/bash# ...

最新文章

  1. sklearn使用FeatureHasher处理字符串特征: AttributeError: ‘str‘ object has no attribute ‘items‘
  2. cplex学术版安装
  3. Java之【线程通信】--标志位练习
  4. C#怎么遍历一个对象里面的全部属性?
  5. C# 查询一张表的数据用于补充另外一张表的数据 MySQL数据库
  6. node那点事(二) -- Writable streams(可写流)、自定义流
  7. java演练 谁在哪里做什么 文字小游戏开发
  8. Pythonz中模块内的__name__用法示例
  9. 交叉编译iproute2
  10. pcDuino–voip服务器设置呼叫彩铃
  11. Numpy的学习6-深浅赋值(copydeep copy)
  12. copy linux file to mac,Mac Linux互相传递文件
  13. Android 四大组件学习之Activity四
  14. fedora14 官方下载地址
  15. PCB中常见的单位换算
  16. 线性代数可以速成吗_怎样速成线性代数?
  17. Notification 加入本地的声音文件
  18. 手把手教你搭建LAMP环境,运行第一个属于你的个人网站
  19. k8s-service底层之 Iptables与 IPVS
  20. 全球经济大萧条,春风沐浴网上店

热门文章

  1. 创建私有CA及私有CA的使用
  2. 验证码不显示,如何进入phpcms管理后台
  3. 把文档放到PNG图片中
  4. 网络中最常用的网络命令(6)-完整参数
  5. 架构师之路 — 数据库设计 — 关系型数据库的约束类型
  6. Linux_PXE服务器_RHEL7
  7. word取消“在页面视图中显示页面间空白”后,关闭打开又自动勾上
  8. Newtonsoft.Json 概述
  9. kafka官方文档学习笔记2--QuickStart
  10. 20145234黄斐《信息安全系统设计基础》第九周学习总结(课本部分)