簡體   English   中英

HTML圖像在Chrome中無法正確顯示,但在Safari和Firefox中可正確顯示

[英]HTML Image not displaying correctly in Chrome, but is displaying correctly in Safari and Firefox

<div style="position: relative; left: 0px; top: 0px;"> 

<img class="imageAAMP" src="catbanner.jpg" type="image/jpg" width="800" height="300" alt="Adios my petite croissant" style="position: relative;"/>

<img class="imageAAMP2" src="catbanner2.jpg" type="image/jpg" width="800" height="300" alt="Adios my petite croissant" style="position: absolute;"/>

<div> 

這是我的CSS

.container{
    width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 50px;
    background-color: #ffffff;
    border-color: #000000;
    border-style: solid;
    border-width: 1px;
    padding: 25px;
}

img.imageAAMP{
    width: 800px;
    margin: auto;
    margin-top: auto;
    position: static
}

img.imageAAMP2{
    width: 800px;
    position: absolute;
    margin-left: -800px;
    transition: opacity 2s ease-in-out;
    -webkit-transition: opacity 2s ease-in-out;
}

img.imageAAMP2:hover{
    opacity: 0;
}

該圖像應顯示在第一張圖像的頂部,位於左下角。 這是為了進行懸停淡入淡出過渡。 在Safari和Firefox上,一切正常,但在chrome上無法正確顯示。

<div style="position: relative; left: 0px; top: 0px;"> 

            <img class="imageAAMP" src="catbanner.jpg" type="image/jpg" width="800" height="300" alt="Adios my petite croissant" style="position: relative;"/>

            <img class="imageAAMP2" src="catbanner2.jpg" type="image/jpg" width="800" height="300" alt="Adios my petite croissant" style="position: absolute;"/>
<div>

暫無
暫無

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

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