效果图:


 html源代码:

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>湖南城市学院</title> <link rel="stylesheet" type="text/css" href="css/hncu.css" />
</head> <body>
<div id="hncu_header"> </div> <div id="hncu_nav">
<div>
<a href="#">首页</a>
</div> <div>
<a href="#">新闻</a>
</div> <div>
<a href="#">联系</a>
</div> <div>
<a href="#">关于</a>
</div>
</div> <div id="hncu_content">
<div id="hncu_left"></div>
<div id="hncu_center"></div>
<div id="hncu_right"></div>
</div> <div id="hncu_footer"> </div>
</body>
</html>

CSS源代码:

@charset "utf-8";

*{
margin: 0px;
padding: 0px;
} body{
background-color: #bfc;
} #hncu_header{
width: 1000px;
height: 200px;
background-color: skyblue; margin:10px auto 10px;
} #hncu_nav{
width: 1000px;
height: 70px;
background-color: blue; margin:0px auto 10px; overflow:hidden;
zoom:;
} #hncu_nav a{
width: 25%;
color:white; float:left;
line-height:70px;
text-align:center;
text-decoration: none;
} #hncu_nav a:link{
background-color: blue;
} #hncu_nav a:visited{
background-color: blue;
} #hncu_nav a:hover{
background-color: red;
} #hncu_nav a:active{
color: blue;
} #hncu_content{
width: 1000px;
height: 600px;
background-color: yellow; margin:0px auto 10px;
} #hncu_left{
width: 200px;
height: 500px;
background-color: green; margin-top:50px;
float:left;
} #hncu_center{
width: 580px;
height: 500px;
background-color: #bfc; margin-top:50px;
margin-right: 10px;
margin-left: 10px;
float:left;
} #hncu_right{
width: 200px;
height: 500px;
background-color: pink; margin-top:50px;
float:left;
} #hncu_footer{
width:1000px;
height:200px;
background-color:skyblue; margin:0px auto 10px;
}

__x__(30)0908第五天__导航条的练习 <div>版本的更多相关文章

  1. __x__(31)0908第五天__导航条的练习 <ul> 版本

    效果图:  html代码: <!doctype html> <html> <head> <meta charset="utf-8" /&g ...

  2. __x__(29)0908第五天__高度塌陷 问题

    高度塌陷 在文档流中,父元素的高度默认是被子元素撑开的. 但是当为 子元素 设置 float 时,子元素会完全脱离文档流,无法再撑开父元素,导致父元素高度塌陷...以致于布局混乱 变成 BFC块级格式 ...

  3. __x__(34)0908第五天__ 定位 position

    position 定位 指将原始摆放到页面的任意位置. 继承性:no 默认值:static        没有定位,原始出现在正常的文档流中 可选值: static :    默认值,元素没有开启定位 ...

  4. __x__(35)0908第五天__ 层级 z-index

    如果三个 div 全部设置 position: absolute; 绝对定位,且未设置 z-index,  则从代码结构上    下面的元素 会盖住 上面的元素. z-index 层级: 通过 z-i ...

  5. __x__(36)0908第五天__背景 background

    1. 背景 background: red url(img/cat.gif) repeat-x fixed; 2. 背景颜色 background-color: red; 3. 背景图片 backgr ...

  6. __x__(40)0909第五天__表格 table 的 css 样式 美化

    如果就向下面的代码那样,不写 tbody , 则浏览器自添加 tbody , 并将所有的 tr 移入 tbody 意味着 tr 并非 table 的子元素,而是 tbody 的子元素. 所以 以后编写 ...

  7. __x__(41)0909第五天__长表格

    长表格 银行流水,表格很长... 则需要将表格分为 表头 thead ,主体数据 tbody , 表格底部 tfoot 三个标签无顺序要求,易于维护:thead → tfoot → tbody 如果没 ...

  8. __x__(32)0908第五天__Photoshop的基本操作

    1. 设置 Photoshop 的单位为 像素px 2. 标尺   显示与隐藏 Ctrl + r 3. 放大与缩小 Ctrl + 1    放大到100% Ctrl + 0    适应屏幕 Alt + ...

  9. __x__(35)0908第五天__opacity 透明度

    opacity 透明度 设置一个  0 - 1 之间的值. opacity: 0;    完全透明 opacity: 0.5    半透明 opacity: 1;    完全不透明 缺点: IE8及以 ...

随机推荐

  1. EF CodeFirst系列(8)--- FluentApi配置单个实体

    我们已经知道了在OnModelCreating()方法中可以通过FluentApi对所有的实体类进行配置,然而当实体类很多时,我们把所有的配置都放在OnModelCreating()方法中很难维护.E ...

  2. ORACLE升级PSU&OJVM注意的问题及遇到问题解决思路

    [环境介绍] 系统环境:Solaris + Oracle 11R2 + OGG + 脚本定时任务统计信息收集 [背景描述] 基于集团的安全检查,需要对数据库版本进行漏洞扫描,漏洞扫描中存在RBDMS和 ...

  3. [物理学与PDEs]第1章第2节 预备知识 2.2 Ampere-Biot-Savart 定律, 静磁场的散度与旋度

    1. 电流密度, 电荷守恒定律 (1) 电荷的定向移动形成电流. (2) 电流密度 ${\bf j}$, 是描述导体内一点在某一时刻电流流动情况的物理量, 用单位时间内通过垂直于电流方向的单位面积的电 ...

  4. HTML常用知识点代码演示

    1 HTML部分常用知识点 <!-- 版本声明 --> <!DOCTYPE html> <!-- 唯一根元素 --> <html> <!-- 对网 ...

  5. 「CTSC2018」暴力写挂

    毫无$ Debug$能力 全世界就我会被卡空间.jpg LOJ #2553 UOJ #400 Luogu P4565 题意 给定两棵树$ T,T'$,求一组点对$ (x,y)$使得$deep(x)+d ...

  6. Choreographer解析

    Choreographer_舞蹈编导 为什么叫舞蹈编导,因为舞蹈是由节奏的,节奏是每个点位动作的快慢控制,跳舞时节奏很重要,编舞者控制节奏.视图刷新也是如此,不是说你想刷就能刷,一切要按照底层信号要求 ...

  7. LeetCode第十四题-字符串数组中最长的共同前缀

    Longest Common Prefix 问题简介: 编写一个函数来查找字符串数组中最长的公共前缀字符串,如果没有公共前缀,则返回空字符串"" 举例: 1: 输入: [“xwq” ...

  8. Web从入门到放弃<5>

    <1> CSS_DOM 1,structural layer 2,presentation layer 3,behavior layer style也是一个属性 <!DOCTYPE ...

  9. 解决jenkins构建job报错“NoClassDefFoundError” in jenkins/scm/RunWithSCM问题

    现象 使用Jenkins 2.8,当我运行一个简单的Jenkins工作时,构建一个job获取源代码,出现下面的错误 FATAL: jenkins/scm/RunWithSCM java.lang.No ...

  10. Gmagick convert SVG to PNG with transparent/opacity background

    1 前言 在Ubuntu18.04环境下,用gographics/gmagick API使用了以下代码未有效果 pw := gmagick.NewPixelWand() pw.SetOpacity(1 ...