我有一个iframe
元素,我想使其内容可读,这意味着我基本上可以正确看到iframe的页面并使其可滚动,以便我们可以看到整个页面而不减小其缩放或大小。我无法做到我想要的。我无法使其滚动,也看不到iframe的全部内容。
#janela, #docwindow{
position: absolute;
width:500px;
height:500px;
left:200px;
top:200px;
border-radius:10px black solid;
z-index: 5;
}
/****JANELA****/
#janelaCalendario{
position: absolute;
width:800px;
height:700px;
left:500px;
top:200px;
border-radius:10px black solid;
z-index: 1000;
}
#calendar{
width:100%;
height:90%;
border:none;
}
#janelaCalendarioHeader{
z-index:10;
height: 30px;
background: rgb(30,87,153); /* Old browsers */
background: -moz-linear-gradient(top, rgba(30,87,153,1) 0%, rgba(41,137,216,1) 50%, rgba(32,124,202,1) 51%, rgba(125,185,232,1) 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(top, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=0 ); /* IE6-9 */
}
#closeCal{
width: 20px;
height:20px;
top:5px;
right:5px;
background-color: none;
position:absolute;
border-radius:100%;
}
<div id="janelaCalendario" >
<div id="janelaCalendarioHeader">
<header class="windowTop">
<img id="closeCal" class="X" src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/256/Actions-dialog-close-icon.png" alt="X" onclick="fecharCal()">
</header>
</div>
<iframe src="https://teamup.com/ksbe6drnzpwdbyrgp2" id="calendar" scrolling="yes"></iframe>
</div>
答案 0 :(得分:0)
使用包装器div并将iframe保留在其中很简单。
#wrapper {
width: 100vw;
height:100vh;
}
<div id="wrapper">
<iframe src="https://teamup.com/ksbe6drnzpwdbyrgp2" width="100%" height="100%"></iframe>
</div>