我有一个包含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 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>
Run Code Online (Sandbox Code Playgroud)
可嵌入页面:
<!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; …Run Code Online (Sandbox Code Playgroud)