何らかの理由で、私のライブWebサイトの(スプライトシートからの)画像は、ローカルバージョンとは異なる位置に配置されています。それは私を夢中にさせます!要素を調べると、ライブ時にスプライトシートのスケーリングがわずかに異なっているようです。これにより、画像が必要以上に右にシフトしています。なぜ何かアイデアはありますか?
よろしくお願いします!
HTML:
<div id="icon-container">
<div class="icon">
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s2" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s3" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s4" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s5" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s6" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s7" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s8" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s9" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s10" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s11" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s12" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s13" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s14" alt="" src="images/assets/spritesheet.png">
</a>
<a class="stretchy">
<img class="spacer" alt="icon" src="images/assets/spacer.png">
<img class="sprite s15" alt="" src="images/assets/spritesheet.png">
</a>
</div>
</div>
CSS:
.stretchy {display:block; position:relative; overflow:hidden; max-width:400px; }
.stretchy .spacer { width: 100%; height: auto; }
.stretchy .sprite {
position:absolute; top:-5px; left:0; max-width:none; max-height:100%;
}
.stretch img { width: 100%; }
.stretchy .sprite.s2 {left:-103%;}
.stretchy .sprite.s3 {left:-205%;}
.stretchy .sprite.s4 {left:-307%;}
.stretchy .sprite.s5 {left:-407%;}
.stretchy .sprite.s6 {left:-508%;}
.stretchy .sprite.s7 {left:-608%;}
.stretchy .sprite.s8 {left:-709%;}
.stretchy .sprite.s9 {left:-811%;}
.stretchy .sprite.s10 {left:-911%;}
.stretchy .sprite.s11 {left:-1012%;}
.stretchy .sprite.s12 {left:-1113%;}
.stretchy .sprite.s13 {left:-1216%;}
.stretchy .sprite.s14 {left:-1318%;}
.stretchy .sprite.s15 {left:-1418%;}