iframe的高度
问题描述:
我与这个网页的: http://icelandwithkids.com/2016/02/11/do-i-need-a-4wd-awd-4x4-car-in-iceland/iframe的高度
有,它提供了谷歌地图的iFrame:
<iframe width="100%" height="500" src="https://www.google.com/maps/embed?pb=!1m24!1m8!1m3!1d901747.8867442308!2d-19.44933680502082!3d63.804830147198125!3m2!1i1024!2i768!4f13.1!4m13!3e6!4m5!1s0x48d74a424936b0d1%3A0xbe83531b006d778d!2sVik%2C+Iceland!3m2!1d63.4186315!2d-19.0060479!4m5!1s0x48d11a6e58c79679%3A0x48dc5b5397a88a8d!2sSveinstindur%2C+Iceland!3m2!1d64.1069444!2d-18.4166667!5e0!3m2!1sen!2sus!4v1455105815201/" scrolling="yes" class="iframe-class" frameborder="0"></iframe>
不管我做什么,iFrame的高度不会改变 - 它被卡在一个非常小的高度。我试过使用perentage;我试过一些风格的东西,因为我在this page上找到了。但似乎没有任何区别。
我认为页面上的其他一些CSS会阻止使用iFrame高度选项?
感谢您的任何帮助。
答
因为在你的CSS您有:
embed,iframe,object,video{
height:auto !important
}
这迫使它是汽车,不管你做什么。
你也有还设置了iframe的高度,以auto !important
cache.skin.css
删除这些,那么你可以设置任何你想要你的身高外部文件。
谢谢。我删除了第一个代码块。我想弄清楚第二个在哪里。 cache.skin.css看起来像它链接到: http://icelandwithkids.com/wp-content/themes/piemont/cache/cache.skin.css 但我不知道我看到有关iFrame的任何内容那里? – IcelandWithKids
删除高度:自动在'.blog-post iframe'中设置。 – Ibu
明白了。我现在在http://icelandwithkids.com/wp-content/themes/piemont/style.css看到了这一点。谢谢。 – IcelandWithKids