首 页
网络学院
视频教程
资源下载
HOT
实例教程
图文教程
专题中心
学习社区
繁體中文
当前位置:
首页
>
图文教程
>
网页制作
>
CSS样式表
> Iframe自适应高度兼容ie,firefox多浏览器
CSS样式表
网页设计布局基础
Lesson01_01 HTML基础
HTML的全局架构标签
Lesson01_03 注释与特殊字符
Lesson01_04 格式标签与文本标签
Lesson01_05 HTML中的超链接
Lesson01_07 图像标签
Lesson02_01 表格标签
Lesson02_02 帧标签
Lesson02_03 表单标签
Lesson02_04 表单标签(2)
Lesson02_05 头元素
Lesson02_06 分区标签
Lesson03_02 样式规则选择器
学习标准——笔记
用好href的target属性
常用CSS集合
教你如何用CSS来控制网页字体的显示样式
用CSS解决中英文混合字符串的截取省略问题的解决办法
鼠标移动到超链接上的效果
No.
«
‹
35
36
37
38
›
»
技术文章搜索
关键字
CSS样式表 中的 Iframe自适应高度兼容ie,firefox多浏览器
出处:
互联网
整理:
软晨网(RuanChen.com)
发布:
2009-09-12
浏览: 145 ::
收藏到网摘: n/a
自定义标签实现圆角边框
IE之死__原来与CSS有关
从网上找的Iframe自适应高度,不是自已写的! 从哪找的忘了,要不一定写明出处! 放出来给自已留个备份!
复制代码
代码如下:
<script type="text/javascript">
function SetCwinHeight(){
var bobo=document.getElementById("bobo"); //iframe id
if (document.getElementById){
if (bobo && !window.opera){
if (bobo.contentDocument && bobo.contentDocument.body.offsetHeight){
bobo.height = bobo.contentDocument.body.offsetHeight;
}else if(bobo.Document && bobo.Document.body.scrollHeight){
bobo.height = bobo.Document.body.scrollHeight;
}
}
}
}
</script>
<iframe width="100%" id="bobo" onload="Javascript:SetCwinHeight()" height="1" frameborder="0" src="/default.asp?cateID=1"></iframe>
点击运行可以看到效果:
[Ctrl+A 全选 提示:你可先修改部分代码,再按运行]
自定义标签实现圆角边框
IE之死__原来与CSS有关
评论 (0)
All
登陆
还没注册?