iFrame with Fixed Header

帅比萌擦擦* 提交于 2019-12-22 12:27:34

问题


I would like to do something similar to this: http://bit.ly/RLpHme

I'm working on a website for a real estate agent, and she would like to load the listings from her partners site, but have a fixed header at the top with her information.

How would I go about achieving this?

Thanks for the help!


回答1:


fixed header with iFrame, check http://jsfiddle.net/QQKc4/50/

<div id="headerfix"></div>
<iframe id="preview-frame" src="http://www.test.com" frameborder="0"></iframe>

CSS

#headerfix {
    height: 60px;
    background-color:#DDD;
    border-bottom: 3px solid #59A3C8;
    z-index: 99999;
    position: fixed;
    width: 100%;
}
#preview-frame {
    margin: 0 auto;
    display: block;
    padding-top: 60px;
    width:100%;
    height: 581px;
}


来源:https://stackoverflow.com/questions/12550450/iframe-with-fixed-header

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!