首页 > 解决方案 > 图片位置在 IE 和其他浏览器中发生变化

问题描述

我正在使用下面的 css 类来定位图像的位置,但它在 chrome、mozila 和 edge 中放置得很好,但在 IE 中它的显示几乎没有位移。有没有办法修复所有浏览器中图像的位置?

我有第二个问题,使用负值来调整图像,就像我的 css Top=-25px 一样好吗?

html部分:

 <td style="position: relative; width: 28%;">
   <div runat="server" id="CdLogo" class="cd-logo-mc">&nbsp;</div>
 </td>

CSS 部分 -

  .cd-logo-mc {
        position: absolute;
        top: -25px;
        width: 100px;
        height: 60px;
        background-image: url('../content/images/image.png');
        background-position-x: center;
    }

标签: htmlcssasp.net

解决方案


推荐阅读