IE9下不能100%显示iframe问题的三种解决方法
来源:互联网 发布:mac快速接入 编辑:程序博客网 时间:2024/05/01 13:25
方法一:如果在IE8可以显示IE9显示不了,可以降低版本,让网页用低版本显示页面内容,但是其他的显示会受到影响。
(1)在<head>标签里增加如下内容:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
(2)注释掉原先的html头:
<!--
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
(1)在<head>标签里增加如下内容:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
(2)注释掉原先的html头:
<!--
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-->
但是很奇怪。。第一次修改是可以的。。然后我想尝试下别的。。再改回去就不灵了
方法二:就是每次要把div的值找出来然后根据屏幕大小来设置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!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
>
<
meta
http-equiv
=
"Content-Type"
content
=
"text/html; charset=utf-8"
/>
<
title
>Test</
title
>
<
style
>
body, html
{
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.content
{
width: 100%;
height: 100%;
}
.contentframe
{
width: 100%;
height: 100%;
}
</
style
>
<
script
type
=
"text/javascript"
>
function setContentWidth() {
document.getElementById("content").style.width = document.body.clientWidth - 250 + "px";
}
</
script
>
</
head
>
<
body
onload
=
"setContentWidth();"
>
<
div
style
=
"width: 250px; height: 100%; float: left; background: #99C"
>
<
a
href
=
"2.htm"
target
=
"rightframe"
>fsdf</
a
><
br
/>
<
a
href
=
"3.htm"
target
=
"rightframe"
>fsfsafsa</
a
>
</
div
>
<
div
style
=
"float: left; background: #960; height: 100%; position: relative"
>
<
div
class
=
"content"
id
=
"content"
>
<
iframe
scrolling
=
"no"
frameborder
=
"0"
src
=
"2.htm"
class
=
"contentframe"
name
=
"rightframe"
id
=
"Iframe1"
></
iframe
>
</
div
>
</
div
>
</
body
>
</
html
>
方法三:我最后用的办法是这样的
<td width="100%" height="530px" align="center" valign="top"><iframe id="f2" name="f2" height="100%" width="100%" border="0" frameborder="0" src="../index-adv-admin.php"> 浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe></td>
</tr>
直接设置了height的高度。。但是这样的话不同的尺寸就不行了,所以重新修改了一下。。
#forie{
height:530px;!impotant
}
就是放弃了IE能够自适应高度了。。只能在其他浏览器随便改变尺寸。。暂时就这样。。没什么好办法。。
0 0
- IE9下不能100%显示iframe问题的三种解决方法
- iframe不能显示内容的问题
- IE9 table显示问题,td出现错位的解决方法
- IE下iframe第三方网页跨域不能写cookie问题的解决方法
- IE9 不能显示本地图片问题
- IE9 不能显示本地图片问题
- SWFUpload 在IE9下不显示问题及IE9中模态窗下flash文件选择问题的处理
- SWFUpload 在IE9下不显示问题及IE9中模态窗下flash文件选择问题的处理
- dhtmlx tree在IE9下不显示的问题
- plupload iframe 隐藏 再 显示 ie9下 上传不了
- ie9不显示flash的解决方法
- IE6 下 iframe 显示DNS错误 的解决方法
- eWebeditor在IE8、IE9中插入图片按钮不能使用问题的解决方法
- iframe不完全显示的解决方法
- ECSHOP ie9下的切换选项卡问题,不能切换的问题处理
- 【.Net码农】SWFUpload 在IE9下不显示问题及IE9中模态窗下flash文件选择问题的处理
- ie9 提示'console' 未定义问题的解决方法
- ie9 提示'console' 未定义问题的解决方法
- JVM参数配置
- BZOJ1003题解
- LeetCode Remove Duplicates from Sorted Array II
- 计算机经典书籍电子书合集
- 数据挖掘笔记-情感倾向点互信息算法
- IE9下不能100%显示iframe问题的三种解决方法
- git如何恢复本地删除的文件
- GCC笔记
- Row Editing in DataGrid简单讲解
- 页面翻转效果
- nginx介绍(二) 架构篇
- hibernate的核心类和接口
- linux
- 有问题的阶乘之和运行操作行得到输出结果和运行时间的表格(应为还没有看附录)