zoukankan
html css js c++ java
三列中右侧固定左边和中间可变
Code
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<
html
xmlns
="http://www.w3.org/1999/xhtml"
>
<
head
>
<
title
>
test
</
title
>
<
style
type
= "text/css"
>
.main
{
}
{
width
:
450px
;
background
:
#cccccc
;
}
.content
{
}
{
float
:
left
;
width
:
150px
;
background
:
#999999
;
}
;
.left
{
}
{
float
:
left
;
margin-left
:
-150px
;
width
:
150px
;
position
:
relative
;
background
:
#999999
;
color
:
#000000
;
}
;
.content_center
{
}
{
float
:
right
;
margin-right
:
-150px
;
width
:
150px
;
position
:
relative
;
background
:
#333333
;
color
:
#ffffff
;
}
;
.middle
{
}
{
float
:
right
;
width
:
150px
;
}
;
.right
{
}
{
float
:
right
;
width
:
150px
;
}
;
.clear
{
}
{
clear
:
both
;
}
;
</
style
>
</
head
>
<
body
>
<
div
class
= "main"
>
<
div
class
= "content"
>
<
div
class
= "content_center"
>
<
div
class
= "left"
>
左侧可变内容,左侧可变内容
</
div
>
<
div
class
= "middle"
>
中间可变内容,中间可变内容,中间可变内容,中间可变内容
</
div
>
</
div
>
</
div
>
<
div
class
= "right"
>
右侧固定内容
</
div
>
<
div
class
= "clear"
></
div
>
</
div
>
</
body
>
</
html
>
注意:使用该样式的时候,一定要知道固定内容的确切高度,定义可变内容的高度与固定内容的高度相同。
适用情况:三列中只有一列的内容固定。
查看全文
相关阅读:
whoami
w
id
su
chpasswd
chage
password
scrapy框架中Download Middleware用法
scrapy框架持久化存储
scrapy框架中Item Pipeline用法
原文地址:https://www.cnblogs.com/ada313/p/1564300.html
最新文章
cin.get(),cin.getline(),getline(),gets(),getchar()
全排列
π的值
scanf
素数,互素
string(未完待续)
取整函数
hdu-5642 King's Order(数位dp)
hdu-5641 King's Phone (水题)
hdu-5640 King's Cake (水题)
热门文章
hdu-5584 LCM Walk(数论)
hdu-5583 Kingdom of Black and White(数学,贪心,暴力)
hdu-5578 Friendship of Frog(暴力)
codeforces 650D D. Image Preview (暴力+二分+dp)
codeforces 651B B. Beautiful Paintings
codeforces 651A A. Joysticks (模拟)
codeforces 650 C. Watchmen(数学公式)
lastlog
last
who
Copyright © 2011-2022 走看看