开发者

The scrolling attribute on the iframe element is obsolete. Use CSS instead

I've embedded a Google map onto my website in an iframe:

<iframe src="http://www.map-generator.net/extmap.php?name=Spot&amp;address=los%20angeles%2C%20开发者_开发问答ca&amp;width=614&amp;height=244&amp;maptype=map&amp;zoom=14&amp;hl=en&amp;t=1298011905" width="614" height="244" scrolling="no"></iframe>

This is invalid, and I need to somehow pull off the scrolling aspect in CSS. How would I do this?


<iframe style="overflow:hidden;"></iframe>


Late response

The only solution I found so far is setting overflow to hidden and set width, height to a parent div.

In your case:

<div style="width:614px; height:244px;">
    <iframe src="http://www.map-generator.net/extmap.php?name=Spot&amp;address=los%20angeles%2C%20ca&amp;width=614&amp;height=244&amp;maptype=map&amp;zoom=14&amp;hl=en&amp;t=1298011905"width="614" height="244" style="overflow:hidden; width:614px; height:244px;"></iframe>
</div>


I have found another solution which worked.

<iframe src="...." class="frame-abc" scrolling='no' ></iframe>

.frame-abc {
border:none;
overflow:hidden;
margin:0;
height:230px;
width:570px; 
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜