0

好的,在 MAC OSX 上的 Google Chrome 中查看此页面: http ://opportunityfinance.net/Test/2013conf/index.html

向下滚动以查看以下内容:

Chrome 中的初始加载问题

如果您调整浏览器窗口的大小,它会正确对齐,如下图所示:

它应该是什么样子以及调整浏览器窗口大小时的外观

所以,我的问题是如何在页面初始加载时获得第二张图片的外观?<div class="gold">谷歌浏览器最初使用以下代码将高度设置为 0px:

jQuery(document).ready(function($){

    var gold = $(".gold");

    $(window).bind("resize", function(){
        gold.css({'height': gold.children(":first").children("img").height()});             
    }).trigger("resize");
});

这是我正在使用的 HTML:

<div class="gold" style="width: 100%; position: relative; margin-top: 1em; margin-bottom: 1em;">
    <div style="position: absolute; bottom: 0px; right: 0px; width: 32%;">
        <img src="images/wellsfargo.png" alt="Wells Fargo" style="border: none; max-width: 100%;">
    </div>
    <div style="float: left; width: 32%; bottom: 0px; left: 0px; position: absolute;">
        <img src="images/citi.png" alt="Citi" style="max-width: 100%; border: none;">
    </div>
    <div style="margin: 0 auto; width: 34%; position: absolute; bottom: 0px; left: 0px; right: 0px;">
        <img src="images/gs10ksb.png" alt="Goldman Sachs 10000 Small Businesses" style="border: none; max-width: 100%;">
    </div>
</div>
4

0 回答 0