iframe 自适应高度 宽度 全css 实现 无 javascript
<html>
<body style="margin:0;">
<div>
<table style="width:100%;height:100%" cellpadding='0' cellspacing='0'>
<tr>
<td style="width:120px;background-color:Red">
<iframe id="MU" name="MU" style="position:absolute;top:auto;bottom:0px;height:100%;left:auto;right:0px;width:100%">
</iframe>
</td>
<td style="background-color:Yellow">
<iframe id="WA" name="WA" style="position:absolute;top:0px;bottom:0px;left:120px;right:0px;width:100%;height:100%"
src="about:blank">
</iframe>
<div >a</div>
</td>
</tr>
</table>
</div>
</body>
</html>
注: position:absolute;top:auto;bottom:0px;height:100%;left:auto;right:0px;width:100%
去掉top:auto;bottom:0px;height:100%;为宽度自适应
去掉left:auto;right:0px;width:100%为高度自适应
相关文档:
//css样式的书写
//元素ID
#tb1{width:100%;height:80px;background-color:#FFD700;padding:4px;font-family:verdana,tahoma;font-weight:bold;}
#tb2{width:100%;padding:4px;font-family:verdana,tahoma;margin:12px
0px 0px 0px;background-color:#EEEEEE;font-weight:bold;}
//类
.test{cursor:hand;
&nb ......
display Property Values
ValueDescription
none
The element will generate no box at all
block
The element will generate a block box (a line break before and after the element)
inline
The element will generate an inline box (no line break before or after the element). This is default
inline-blo ......
文章转自于:http://www.pqshow.com/design/Dreamweaver/200912/12674.html
由于项目中编写文档结构、编写CSS的人员较多,并与程序员协同工作,所以就需要统一开发规范,根据XHTMl和CSS编织的规范和大多人的习惯,整理了以下针对本项目的一个简单的开发规范:
一、CSS文件及样式命名
1、CSS文件命名规范
全局样式:gl ......
div+css浏览器兼容问题解决方法
从网上收集了IE7,6与Fireofx的兼容性处理方法并整理了一下.对于web2.0的过度,请尽量用xhtml格式写代码,而且DOCTYPE 影响 CSS 处理,作为W3C的标准,一定要加 DOCTYPE声名.
CSS技巧
1.div的垂直居中问题 vertical-align:middle; 将行距增加到和整个DIV一样高
line- ......