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
>
注意:使用该样式的时候,一定要知道固定内容的确切高度,定义可变内容的高度与固定内容的高度相同。
适用情况:三列中只有一列的内容固定。
查看全文
相关阅读:
解决android.os.NetworkOnMainThreadException
android 模拟器对应键盘快捷键
Android上解析Json格式数据
命令行的由来
Linux测网速
cacti
判断端口是否开放
Linux中运行c程序,与系统打交道
python 多线程
Leetcode 编程训练(转载)
原文地址:https://www.cnblogs.com/ada313/p/1564300.html
最新文章
function HDU
4 Values whose Sum is 0 UVA
狄利克雷卷积&&杜教筛&&莫比乌斯反演
17国庆day3
17国庆day2
莫比乌斯反演
php微信公众号开发
js原生回到顶部
django自定义标签,int转化为str类型
linux 权限
热门文章
js 求select option 的值和对应option的内容
bootstrap-multiselect 全选全部勾选选中,取消全部勾选取消
linux tail 命令详解
linux ssh root登陆出现错误:Permission denied, please try again
linux nginx 添加到全局变量中(环境变量)
linux 安装Git详细过程
Android之自定义Adapter的ListView
安卓餐厅点餐系统---针对浩然android工作室的一个小白的分析
27种设计模式
发现一个可以获取扣扣基本信息的接口
Copyright © 2011-2022 走看看