Css Iframe';s溢出问题
我有一个包含iframe的简单页面。iframe包含一个带有一些div的页面。当我单独打开嵌入页面时,效果非常好。应该溢出的div已溢出。但当我打开容器站点时,它不是。这是我的密码: 容器页面:Css Iframe';s溢出问题,css,iframe,overflow,Css,Iframe,Overflow,我有一个包含iframe的简单页面。iframe包含一个带有一些div的页面。当我单独打开嵌入页面时,效果非常好。应该溢出的div已溢出。但当我打开容器站点时,它不是。这是我的密码: 容器页面: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta h
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
#content{
margin: auto;
width: 500px;
height: 1000px;
background: green;
}
#frame{
width:202px;
height:302px;
overflow: visible;
}
</style>
</head>
<body>
<div id="content">
<iframe id="frame"
src="http://localhost:8080/webApp/view/test/embeddable.html"
scrolling="no" frameborder="0" allowTransparency="true" marginheight="0" marginwidth="0">
</iframe>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
body {
width: 200px;
height: 300px;
overflow: visible;
border: 1px solid yellow;
}
#id1{
margin: auto;
width: 500px;
height: 10px;
border: 1px solid white;
background: red;
margin-top: 20px;
}
</style>
</head>
<body>
<div id="id1"></div>
</body>
</html>
#内容{
保证金:自动;
宽度:500px;
高度:1000px;
背景:绿色;
}
#框架{
宽度:202px;
高度:302px;
溢出:可见;
}
可嵌入页面:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
#content{
margin: auto;
width: 500px;
height: 1000px;
background: green;
}
#frame{
width:202px;
height:302px;
overflow: visible;
}
</style>
</head>
<body>
<div id="content">
<iframe id="frame"
src="http://localhost:8080/webApp/view/test/embeddable.html"
scrolling="no" frameborder="0" allowTransparency="true" marginheight="0" marginwidth="0">
</iframe>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
body {
width: 200px;
height: 300px;
overflow: visible;
border: 1px solid yellow;
}
#id1{
margin: auto;
width: 500px;
height: 10px;
border: 1px solid white;
background: red;
margin-top: 20px;
}
</style>
</head>
<body>
<div id="id1"></div>
</body>
</html>
身体{
宽度:200px;
高度:300px;
溢出:可见;
边框:1px纯黄色;
}
#id1{
保证金:自动;
宽度:500px;
高度:10px;
边框:1px纯白;
背景:红色;
边缘顶部:20px;
}
id1应该溢出,但它不是。我已经将所有重要div的“overflow”属性设置为“visible”(即使它是默认值)。我不知道我做错了什么。简而言之,iframe不可能溢出。给出了一个解释 为了达到类似的效果,最好使用AJAX将嵌入的页面注入div,并使div溢出