繁体   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