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
>
注意:使用该样式的时候,一定要知道固定内容的确切高度,定义可变内容的高度与固定内容的高度相同。
适用情况:三列中只有一列的内容固定。
查看全文
相关阅读:
iOS沙盒路径
iOS第三方语音-讯飞语音
iOS第三方分享-ShareSDK
iOS第三方语音-微信语音
iOS-xib(自定义UITableViewCell)
UITableView点击背景
OC开发_Storyboard——UIApplication和网络活动指示器
OC开发_Storyboard——绘制和视图
OC开发_Storyboard——block和动画
OC开发_Storyboard——NaviationController简单例子
原文地址:https://www.cnblogs.com/ada313/p/1564300.html
最新文章
异步加载
自适应label的高度
记录一下所了解的一些第三开源框架
地址指针的使用
创建单例的方式
字符串的一些处理
随机数的生成
MVC
UI 响应者链
KVC KVO
热门文章
解析LayoutSubviews
iOS中谓词的使用
iOS/Xcode异常:reason = “The model used to open the store is incompatible with the one used to create the store”
SQLite错误码
SQL语句
显示隐藏文件 + 断点打印调试
iOS视频录制裁剪合成
iOS导航栏-关闭半透明
iOS视频压缩
视频播放器边下边播(保存到沙盒,显示进度)
Copyright © 2011-2022 走看看