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
>
注意:使用该样式的时候,一定要知道固定内容的确切高度,定义可变内容的高度与固定内容的高度相同。
适用情况:三列中只有一列的内容固定。
查看全文
相关阅读:
OkHttp的基本使用方法
C#中Dictionary小记
SQL Server表的数据量大小查询
基于.NET平台常用的框架整理
JQuery中ajax的相关方法总结
JQuery中的工具函数总结
Asp.net MVC 中Controller返回值类型ActionResult
Plupload文件上传组件使用API
HTTP 方法:GET 对比 POST
C#使用简单邮件传输协议(SMTP)发送邮件
原文地址:https://www.cnblogs.com/ada313/p/1564300.html
最新文章
emit和on的用法
虚拟机封装
MySQL与RAID
RAID基础
drbd 配置
pkill 和 pgrep总结
Learn More Study Less `my notes`
分区表,磁盘概念和parted的使用
Mysql读写分离操作之mysql-proxy
真tm无聊,这几天。。。
热门文章
HTTPS工作原理
android自定义控件概述
关于Git-吊炸天的分布式版本管理软件
android SDK开发经验总结
OKHttp实现原理
关于android中内存泄漏的几种情况
关于 android的消息机制
Okhttp之Https
关于Vector到底是不是 线程安全的 问题
Okhttp之 拦截器(Interceptor)专题
Copyright © 2011-2022 走看看