我有一個需要通過iframe提供的頁面,但我只需要顯示頁面的一部分,而不是整個內容。定位內容框中的iframe內容
我當前的代碼是:
<div style="display:block;overflow:hidden;width:500px;height:350px;">
<iframe height="350px" scrolling="no"
src="http://my/page/i/want/to/show/part/of/here/" width="500px"></iframe></div>
我認爲最好的辦法是投放具有「溢出:隱藏」含有專區內的iframe,以便它就像一個相框。這是有效的,但問題是我想顯示的內容位於iframe頁面的中間,div始終假定0,0是框架的開始。我需要定位iframe,以便div正好在我希望可見的頁面部分上。
我可以這樣做嗎?
試試這個:HTTP://stackoverflow.com/a/21004331/1873806 – Svet 2016-10-13 00:08:37