博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CSS three column layout
阅读量:7212 次
发布时间:2019-06-29

本文共 3742 字,大约阅读时间需要 12 分钟。

ExpandedBlockStart.gif
代码
 1 
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
 2 
<
html 
xmlns
="http://www.w3.org/1999/xhtml"
>
 3 
 4 
<
head
>
 5 
<
meta 
content
="text/html; charset=utf-8"
 http-equiv
="Content-Type"
 
/>
 6 
<
title
>
 three column layout 
</
title
>
 7 
<
meta 
name
="Generator"
 content
="缔友计算机信息技术有限公司 ,2010"
 
/>
 8 
<
meta 
name
="Author"
 content
="Geovin Du 涂聚文"
 
/>
 9 
<
meta 
name
="Keywords"
 content
="缔友计算机信息技术有限公司 ,2010,Cascading, Style, Sheets, CSS1, CSS2, CSS"
 
/>
10 
<
meta 
name
="Description"
 content
="CSS ~ Cascading Style Sheets"
 
/>
11 
<
style 
type
="text/css"
>
12 
13 
html, body 
{
margin
:
0px
;
 padding
:
0px
;
 background
:
#eee
;
 font-family
:
verdana
;
 font-size
:
12px
;
}
14 
#main
15 
{
16 
    width
:
80%
;
    
17 
    margin-left
:
auto
;
18 
    margin-right
:
auto
;
19 
}
20 
/*
 The header and footer 
*/
21 
.headfoot 
{
display
:
block
;
 height
:
70px
;
 background
:
#08a
;
 color
:
#fff
;
 text-align
:
center
;
 padding
:
5px
;
font-size
:
30px
;
}
22 
23 
/*
 This bit does all the work 
*/
24 
#container 
{
position
:
relative
;
 display
:
block
;
 background
:
#0ac
;
 border-left
:
200px solid #aa8
;
 border-right
:
200px solid #a8a
;
}
25 
#inner 
{
display
:
block
;
 margin-left
:
-200px
;
 margin-right
:
-200px
;
 padding
:
5px
;
}
26 
#left 
{
float
:
left
;
 position
:
relative
;
 width
:
200px
;
 left
:
0px
;
}
27 
#right 
{
float
:
right
;
 position
:
relative
;
 width
:
190px
;
 right
:
0px
;
}
28 
#center 
{
margin-left
:
200px
;
 margin-right
:
200px
;
 position
:
relative
;
 display
:
block
;
 height
:
1%
;
}
29 
.clear 
{
clear
:
both
;
}
30 
31 
/*
 Just to extend each column 
*/
32 
#inner a:visited, a 
{
color
:
#000
;
 text-decoration
:
none
;
 cursor
:
default
;
}
33 
#inner a span 
{
display
:
none
;
}
34 
#inner a:active, #inner a:focus 
{
color
:
#fff
;
 text-decoration
:
none
;
 background
:
transparent
;
 cursor
:
default
;
}
35 
#inner a:active span, #inner a:focus span 
{
display
:
block
;
}
36 
37 
a:visited, a 
{
text-decoration
:
underline
;
 cursor
:
pointer
;
}
38 
a:hover 
{
text-decoration
:
none
;
 cursor
:
pointer
;
}
39 
40 
em 
{
font-weight
:
bold
;
}
41 
</
style
>
42 
</
head
>
43 
44 
<
body
>
45 
<
div 
class
="main"
 id
="main"
>
46 
<
div 
class
="headfoot"
>
兼容各浏览器
</
div
>
47 
48 
<
div 
id
="container"
>
49 
    
<
div 
id
="inner"
>
50 
        
<
div 
id
="left"
><
href
="#"
><
em
>
CLICK
</
em
>
 here to make the left column the longest
<
span
>
this is the left column
<
br 
/>
this is the left column
<
br 
/>
this is the left column
<
br 
/>
this is the left column
<
br 
/>
this is the left column
<
br 
/>
this is the left column
<
br 
/>
this is the left column
<
br 
/>
this is the left column
</
span
></
a
></
div
>
51 
52 
        
<
div 
id
="right"
><
href
="#"
><
em
>
CLICK
</
em
>
 here to make the right column the longest
<
span
>
this is the right column
<
br 
/>
this is the right column
<
br 
/>
this is the right column
<
br 
/>
this is the right column
<
br 
/>
this is the right column
<
br 
/>
this is the right column
<
br 
/>
this is the right column
<
br 
/>
this is the right column
<
br 
/>
this is the right column
<
br 
/>
this is the right column
<
br 
/>
this is the right column
<
br 
/></
span
></
a
></
div
>
53 
54 
        
<
div 
id
="center"
><
href
="#"
><
em
>
CLICK
</
em
>
 here to make the middle column the longest
<
span
>
this is the middle column
<
br 
/>
this is the middle column
<
br 
/>
this is the middle column
<
br 
/>
this is the middle column
<
br 
/>
this is the middle column
<
br 
/>
this is the middle column
<
br 
/>
this is the middle column
<
br 
/></
span
></
a
></
div
>
55 
            
56 
        
<
div 
class
="clear"
></
div
>
57 
    
</
div
>
58 
59 
60 
</
div
>
61 
<
div 
class
="headfoot"
>
勝利は仕事部屋である貴方にご光来を賜ることを歓迎
<
br 
/>
NOTHING could be simpler...!
</
div
>
62 
</
div
>
63 
</
body
>
64 
65 
</
html
>
66 

转载地址:http://avrum.baihongyu.com/

你可能感兴趣的文章
jQuery的选择器(四)
查看>>
使用firefox和selenium模拟点击js获取更多评论
查看>>
SQL-mysql设置utf8编码方法
查看>>
5.4 异步TCP编程(三)
查看>>
采访Hadley Wickham
查看>>
iframe中的各种跳转方法
查看>>
oracle编程、操作不良习惯总结
查看>>
每天一个linux命令(26):用SecureCRT来上传和下载
查看>>
Oracle 表空间状态
查看>>
为redis分配一个新的端口
查看>>
利用Python做绝地科学家(外挂篇)
查看>>
费下载最新版万能视频格式转换器是一款功能强大的全能视频格式转换软件
查看>>
算法实战——多叉树全路径遍历
查看>>
MySQL数据类型和常用字段属性总结
查看>>
斑点检测(LoG,DoG)(下)
查看>>
《CLR Via C# 第3版》笔记之(二十二) - APM和EAP
查看>>
洛谷P5111 zhtobu3232的线段树
查看>>
Angular Cli 创建的Angular项目应用本地css文件和js文件
查看>>
java代码getHostAddress .getHostName()的练习
查看>>
【转】一个孩子关于MaD的思考概述
查看>>