我想自动将高度调整为其提取的网站内容。我也尝试过iframe。我已经阅读并尝试了来自这里的CSS代码示例 A LOT ,CSS和JS脚本,但没有任何帮助。
先谢谢丹。
这是我的代码。
<object type="text/html" data="https://iloapp.learningknots.com/blog/blog?Home#niceURL" style="width:850px; height:2100px;">
<embed src="https://iloapp.learningknots.com/blog/blog?Home#niceURL"></embed>
Error: Embedded data could not be displayed.</object>
您可以在我的网站上看到它的样子:my website
答案 0 :(得分:0)
将 div 作为容器,giv id &#39>。
<强> HTML 强>
<div class="responsive-object">
<object id="objid" type="text/html" data="https://iloapp.learningknots.com/blog/blog?Home#niceURL">
<embed id="thissite" src="https://iloapp.learningknots.com/blog/blog?Home#niceURL"></embed>
Error: Embedded data could not be displayed.</object>
</div>
<强> CSS 强>
.responsive-object {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#thissite {
height: 100%;
width: 100%;
}
#objid {
height: 100%;
width: 100%;
}
<强>小提琴强>
.responsive-object {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#thissite {
height: 100%;
width: 100%;
}
#objid {
height: 100%;
width: 100%;
}
&#13;
<div class="responsive-object">
<object id="objid" type="text/html" data="https://iloapp.learningknots.com/blog/blog?Home#niceURL">
<embed id="thissite" src="https://iloapp.learningknots.com/blog/blog?Home#niceURL"></embed>
Error: Embedded data could not be displayed.</object>
</div>
&#13;