iFrame with Fixed Header

2019-05-20 21:59发布

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条回答
狗以群分
2楼-- · 2019-05-20 22:35

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;
}
查看更多
登录 后发表回答