主要是几个模块的浮动和定位不好处理,另外还缺少右侧导航,及幻灯片。

 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="jquery.js" type="text/javascript"></script>
<style type="text/css">
*{
margin: 0;
}
#head img{
position: absolute;
left: 50%;
margin-left:-595px;
}
#head{
position: relative;
width: 100%;
height: 80px;
background-color: #f00;
}
.clear{
clear: both;
}
#nav li{
list-style: none;
float: left;
border: 1px solid #000;
font-family: 微软雅黑;
font-weight: bold;
cursor: pointer;
margin-left: 10px; }
#nav{
margin-left: 200px;
}
#left li{
list-style: none;
margin-top: 0px;
border: 1px solid #000;
padding-top: 2px;
padding-bottom: 2px;
padding-left: 10px;
font-family: 微软雅黑;
color: #fff;
} #left ul{
background-color: #888;
width: 190px;
height: 480px;
margin-left: 50px;
margin-top: 10px;
padding-top: 10px;
padding-left: 0px;
}
#left span{
cursor: pointer;
}
#left{
float: left;
position: relative; }
#images{
margin-left: 10px;
float: left;
position: relative; }
#largeImg{
/*margin-left: 10px;*/
margin-top: 10px;
}
#smallImg{
margin-top: 10px;
/*margin-left: 10px;*/ }
#welcom{
width: 190px;
height: 480px;
background-color: #00f;
margin-top: 10px;
margin-left: 10px;
float: left;
position: relative; }
#main{
position: relative;
/*position: absolute;*/
left: 50%;
margin-left: -595px; }
</style>
</head>
<body>
<!-- 广告 -->
<div id="head"><img src="head.jpg"></div>
<!-- main把三个div合到一起 -->
<div id="main">
<!-- 上侧导航 -->
<div id="nav">
<ul>
<li>秒杀</li>
<li>优惠券</li>
<li>闪购</li>
<li>拍卖</li>
</ul>
</div>
<div class="clear"></div>
<!-- 左侧导航 -->
<div id="left">
<ul>
<li><span>家用电器</span></li>
<li><span>手机/数码</span></li>
<li><span>男装/女装</span></li>
<li><span>电脑/办公</span></li>
</ul>
</div>
<!-- 右侧广告 -->
<div id="images">
<div id="largeImg">
<img src="1.jpg" alt="">
</div>
<!-- <div class="clear"></div> -->
<div id="smallImg">
<img src="4.jpg" alt="">
<img src="5.jpg" alt="">
</div>
</div>
<!-- 最右侧充话费 -->
<div id="welcom">
<div>注册</div>
<div>登录</div>
</div>
</div> </body>
<script>
$('#nav li').hover(
function(){
$(this).css({"color":"#f00"});
},
function(){
$(this).css({"color":"#000"});
}
);
$('#left li').hover(
function(){
$(this).css({"background-color":"#ddd"});
},
function(){
$(this).css({"background-color":"#888"}); }
);
$('#left span').hover(
function(){
$(this).css({"color":"#f00"}); },
function(){
$(this).css({"color":"#fff"}); }
); </script>
</html>

Jquery学习笔记(7)--京东导航菜单的更多相关文章

  1. bootstrap学习笔记之为导航条添加标题、二级菜单及状态 http://www.imooc.com/code/3120

    为导航条添加标题.二级菜单及状态 加入导航条标题 在Web页面制作中,常常在菜单前面都会有一个标题(文字字号比其它文字稍大一些),其实在Bootstrap框架也为大家做了这方面考虑,其通过" ...

  2. jQuery学习笔记 - 基础知识扫盲入门篇

    jQuery学习笔记 - 基础知识扫盲入门篇 2013-06-16 18:42 by 全新时代, 11 阅读, 0 评论, 收藏, 编辑 1.为什么要使用jQuery? 提供了强大的功能函数解决浏览器 ...

  3. jQuery ui背景色动态渐变导航菜单

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

  4. bootstrap学习笔记之基础导航条 http://www.imooc.com/code/3111

    基础导航条 在Bootstrap框中,导航条和导航从外观上差别不是太多,但在实际使用中导航条要比导航复杂得多.我们先来看导航条中最基础的一个--基础导航条. 使用方法: 在制作一个基础导航条时,主要分 ...

  5. jQuery学习笔记(一)jQuery选择器

    目录 jQuery选择器的优点 基本选择器 层次选择器 过滤选择器 表单选择器 第一次写博客,希望自己能够长期坚持,以写博客的方式作为总结与复习. 最近一段时间开始学习jQuery,通过写一个jQue ...

  6. jQuery 学习笔记

    jQuery 学习笔记   一.jQuery概述    宗旨: Write Less, Do More.    基础知识:        1.符号$代替document.getElementById( ...

  7. jQuery漂亮图标的垂直导航菜单

    效果展示 http://hovertree.com/texiao/nav/3/ jQuery漂亮图标的垂直导航菜单 是一款当鼠标滑过菜单项时,会有一个背景遮罩层跟着鼠标移动,效果非常炫酷,图标还是矢量 ...

  8. jQuery学习笔记(一):入门

      jQuery学习笔记(一):入门 一.JQuery是什么 JQuery是什么?始终是萦绕在我心中的一个问题: 借鉴网上同学们的总结,可以从以下几个方面观察. 不使用JQuery时获取DOM文本的操 ...

  9. 一款jQuery立体感动态下拉导航菜单特效

    一款jQuery立体感动态下拉导航菜单特效,鼠标经过,在菜单栏上方下拉出一个背景图片,效果十分不错的一款jquery特效. 对IE6都是兼容的,希望大家好好研究研究. 适用浏览器:IE6.IE7.IE ...

  10. JQuery学习笔记——层级选择器

    JQuery学习笔记--层级选择器 上一篇学习了基础的五种选择,分别是id选择器,class选择器,element选择器,*选择器 和 并列选择器.根据手册大纲,这篇学习的是层级选择器. 选择器: 1 ...

随机推荐

  1. jquery dialog close icon missing 关闭图片丢失,样式丢失问题

    http://stackoverflow.com/questions/17367736/jquery-ui-dialog-missing-close-icon

  2. delphi 自定义内存管理

    1.主要通过GetMemoryManager来hook原来的内存管理. 2.通过SetMemoryManager来设置你自己的新的内存管理,可以用一个内存池来优化和管理程序的内存调用情况. proce ...

  3. longest-repeating-character-replacement(难)

    用sliding window的方法,之前还有个k不同元素好像也是类似的思路.有时间可以去复习下. https://leetcode.com/problems/longest-repeating-ch ...

  4. SQL_MODE设置讲解

    SQL_MODE可能是比较容易让开发人员和DBA忽略的一个变量,默认为空.SQL_MODE的设置其实是比较冒险的一种设置,因为在这种设置下 可以允许一些非法操作,比如可以将NULL插入NOT NULL ...

  5. 初入android驱动开发之字符设备(一)

    大学毕业,初入公司,招进去的是android驱动开发工程师的岗位,那时候刚进去,首先学到的就是如何搭建kernel.android的编译环境,然后就是了解如何刷设备以及一些最基本的工具.如adb.fa ...

  6. DevExpress中的lookupedit的使用方法详解

    摘自: http://***/zh-CN/Info/catalog/17631.html 概述:本文详细介绍了DevExpress中的lookupedit的使用方法. 绑定数据源:   1 2 3 l ...

  7. <input type = "submit"> 提交方式和用js的form.submit()有什么区别?

    假设: A表单内有<input type="submit">,通过点击这个input来提交表单 B表单内没有<input type="submit&qu ...

  8. 在笛卡尔坐标系上描绘函数 y=4x^2-2/4x-3

    代码: <!DOCTYPE html> <html lang="utf-8"> <meta http-equiv="Content-Type ...

  9. python 使用 BeautifulSoup 解析html

    下载地址:http://www.crummy.com/software/BeautifulSoup/bs4/download/4.3/beautifulsoup4-4.3.2.tar.gz 说明:这个 ...

  10. lodash merge mergeWith使用

    1.作用 递归合并来源对象的自身和继承的可枚举属性到目标对象. 2.示例 <!DOCTYPE html> <html lang="zh"> <head ...