簡體   English   中英

代碼可在Safari,Firefox和Chrome中運行,但不能在IE(對齊)中運行

[英]Code working in Safari, Firefox, and Chrome, but not in IE (Alignment)

我有一個混合了html,css和javascript的代碼。 顯然,這只是我用來測試將與php內容一起使用的頁面的測試頁面。 問題是,該代碼似乎無法在IE 6或8上正常工作...我可能無法理解IE 6是其舊版瀏覽器,但是為什么它可以在7、9和10上運行卻似乎不在8上工作。我最后檢查過,它在7、9、10上工作,但現在可能不行。 我不確定它的javascript還是CSS多數民眾贊成在扔掉所有東西,這就是為什么我要尋求幫助並將其發布在多個類別中。

實時網站: http//www.technicallyworship.com/styles/style3/test.php

JSFiddle: http : //jsfiddle.net/qu5Vc/

謝謝大家的幫助! 在這一點上,我很困惑,無法解決該問題。 我知道一個事實,它可以按照我想要的方式在Safari和Chrome上運行(這樣可能會為您提供參考點)。 我也將所有這些都包括在下面的代碼中。

<style>
/* Syle 3 CSS Document */

.clear { clear: left; }

#style3 { width: 750px;}

#s3_left { 
width: 750px;
}

#s3_right { 
    float: right;
    padding: 10px;
}




    .meDiv
    {
        position:relative;
        border:1px solid black;
        max-width: 400px;
    }

    .meSmall
    {
        display:block;
        max-width: 400px; border: 2px solid #000;
    }

    .meBig
    {
        z-index:10;
        position:absolute;
        left:0px;
        top:0px;
        display:none;
        max-width: 700px;
        border: 2px solid #000;
    }
    #bigOne { max-width: 700px; max-height 800px;}
</style>

<script>
function Big() {
    document.getElementById('bigOne').style.display = "block";
}

function Small() {
    document.getElementById('bigOne').style.display = "none";
}
</script>


<h1>Testing this out</h1>

<div id="style3">

<div id="s3_left">
<div id="s3_right">
<div class="meDiv">
    <img class="meSmall" src="http://openwalls.com/image/399/explosion_of_colors_1920x1200.jpg" onmouseover="Big();" style="align: right;" />
    <img id="bigOne" class="meBig" src="http://openwalls.com/image/399/explosion_of_colors_1920x1200.jpg" onclick="Small();" onmouseout="Small();" />
</div>
</div>  <!-- s3_right -->
This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. 
</div>  <!-- s3_left -->

</div>  <!-- style 3 -->
<div class="clear"></div>

問題是您正在為小圖片( .meSmall )使用min-width屬性。 您也應該定義width值。 這就是為什么IE不顯示小圖像的原因。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM