我试过身高:100%和身高:汽车等等,我只是不知道还有什么尝试!
这是我的CSS对于框架…
#frame { position: relative; overflow: hIDden; wIDth: 860px; height: 100%;}
然后对于框架的页面.
#wrap { float: left; position: absolute; overflow: hIDden; wIDth: 780px; height: 100%; text-align: justify; Font-size: 16px; color: #6BA070; letter-spacing: 3px;}
该页面的编码看起来像这样…
<!DOCTYPE HTML PUBliC "-//W3C//DTD xhtml 1.0 Transitional//EN" �� "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd"><HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><Meta http-equiv="Content-Type" content="text/HTML;charset=utf-8" > <head><Meta http-equiv="Content-Type" content="text/HTML; charset=UTF-8" /><Title>...</Title> <link rel="stylesheet" href="style.CSS" type="text/CSS" /></head><body> <div ID="container"> <div ID="header"> </div> <div ID="navigation"> <a href="/" >home</a> <a href="about.PHP" >about</a> <a href="fanListing.PHP" >fanListing</a> <a href="reasons.PHP" >100 reasons</a> <a href="letter.PHP" >letter</a> </div> <div ID="content" > <h1>Update information</h1> <iframe name="frame" ID="frame" src="http://website.org/update.PHP" allowtransparency="true" frameborder="0"></iframe> </div> <div ID="footer"> </div></div></body></HTML>
请注意,iframe中的网址与显示iframe的网站不同.但是,我可以访问这两个网站.
谁能帮忙?
@H_419_20@解决方法 我有同样的问题,但发现以下的工作很好:The key to creating a responsive YouTube embed is with padding and a container element,which allows you to give it a fixed aspect ratio. You can also use this technique with most other iframe-based embeds,such as slIDeshows.
Here is what a typical YouTube embed code looks like,with fixed wIDth and height:
06000
It would be nice if we Could just give it a 100% wIDth,but it won’t work as the height remains fixed. What you need to do is wrap it in a container like so (note the class names and removal of the wIDth and height):
06001
And use the following CSS:
06002
这是我找到的解决方案:
https://www.h3xed.com/web-development/how-to-make-a-responsive-100-width-youtube-iframe-embed
根据您的宽高比,您可能需要调整填充底部:56.25%;获得高度正确.
@H_419_20@ @H_419_20@ 总结以上是内存溢出为你收集整理的html – iFrame Height自动(CSS)全部内容,希望文章能够帮你解决html – iFrame Height自动(CSS)所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)