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可控制鼠标的显示效果,如可使鼠标移到普通文本上也显示成手型。 用css控制的语法如下: span style="cursor:*"文本或其它页面元素/span 把 * 换成如下15个效果的一种:
一般而言,鼠标以斜向上的箭头显示,移到文本上 ......
静态定位:position:static(为position属性的默认值)。
动态定位:position:relative或position:absolute或position:fixed。
祖元素:任意包含该元素的元素。 父元素:直接包含该元素的祖元素。 同辈元素:拥有共同的父元素的元素。
注:这些概
念为作者 ......
div+css浏览器兼容问题解决方法
从网上收集了IE7,6与Fireofx的兼容性处理方法并整理了一下.对于web2.0的过度,请尽量用xhtml格式写代码,而且DOCTYPE 影响 CSS 处理,作为W3C的标准,一定要加 DOCTYPE声名.
CSS技巧
1.div的垂直居中问题 vertical-align:middle; 将行距增加到和整个DIV一样高
line- ......
当连续输入英语字符后,由于浏览器默认为一个单词,并不会换行处理,在IE6/IE7 中,我们可以添加css中的word-wrap 属性,实现自动换行。但是在IE8 版本中,该属性不支持。
我们可以采用判断浏览器版本后,使用JavaScript进行换行。
if ($.br ......
第一种,是CSS HACK的方法
height:20px; /*For Firefox*/
*height:25px; /*For IE7 & IE6*/
_height:20px; /*For IE6*/
注意顺序。
这样也属于CSS HACK,不过没有上面这样简洁。
#example { color: #333; } /* Moz */
* html #example { color: #666; } /* IE6 */
*+html #example { color: #999; } /* IE7 */
......