CSS实现frameset
首先是HTML代码:
<div id="outer">
<div id="leftFrame" style="width: 20%;">
<div style="height: 30%" id="packageListFrame" title="All Packages" >
Package list goes here
</div>
<div style="height: 70%" id="packageFrame" title="All classes and interfaces (except non-static nested types)" >
Class list goes here
</div>
</div>
<div style="width: 80%;" id="classFrame" title="Package, class and interface descriptions">
Summary details go here
</div>
</div>
添加如下样式:
<style type="text/css">
#outer { position: relative; }
#leftFrame {
position: fixed;
height: 100%;
width: 20%;
top: 0;
}
#classFrame {
position: absolute;
left: 21%;
width: 77%;
}
#packageListFrame{
position: static;
height: 200px;
overflow: scroll; }
#packageFrame {
position: static;
height: 70%;
overflow: scroll;
}
</style>
相关文档:
类型选择符:单指元素的名字,而没有大于号和小于号
类选择符:选择所有赋有相同类的元素 一个点号后面跟类名,类选择符要跟着类名的后面。 可以把加在通配符*的后面来选择文档中所有赋予该类的元素,
Id 选择符
群组选择符:多个选择符用逗号连起来
后代选择符:多个选择符用空白连起来
子选择符:多 ......
jQuery提供css()的方法来实现嵌入式改变元素样式,css()方法在使用上具有多样性。其中一种接受两个输入参数:样式属性和样式值,它们之间用逗号分开。比如我们要改变链接颜色,我们可以使用下面的代码:$("#61dh a").css('color','#123456');
//这里选择器‘$("#61dh a")’表示ID为‘#61dh’的元素下的所有链接。
//.css( ......
In this specification, the expression collapsing margins means that adjoining margins (no non-empty content, padding or border areas or clearance separate them) of two or more boxes (which may be next to one another or nested) combine to form a single margin.
In CSS 2.1, horizontal margins ne ......
IE和火狐的css兼容性问题归总
CSS对浏览器器的兼容性具有很高的价值,通常情况下IE和Firefox存在很大的解析差异,这里介绍一下兼容要点。
1、DOCTYPE 影响 CSS 处理
2、FF: div 设置 margin-left, margin-right 为 auto 时已经居中, IE 不行
3、FF: body 设置 text-align 时, div 需要设置 margin: aut ......
如果IE6和IE7显示都正常;火狐也没有问题;检查代码也没有误失;就试试加上这段代码
IE8目前还不稳定,腾讯首页利用IE7的内核来渲染IE8,代码如下:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> ......