html - 图片位置在 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"> </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;
}
解决方案
推荐阅读
- python - 根据 Pandas 中相似的列 ID 将多列相乘
- google-visualization - 如何在谷歌图表的 Y 轴上显示完整的数字?
- flutter - 覆盖具有更具体类型的字段时,“'Class.field=' 不是有效的覆盖”
- javascript - 如何在自定义形状(JavaScript、jQuery UI 或 Interact JS)中拖放?
- c# - 我从我的 Web 服务收到此错误:错误 1053 服务未及时响应启动或控制请求
- nuxt.js - nuxt generate 中动态索引的动态路由
- reactjs - Ag Grid React col 等于函数获取未定义的参数
- php - 如何在 Wordpress 中使用 Php Curl 集成 SMS Api
- python - 在 python 中使用推导式表示创建列表和字典
- python - 尝试在不使用 re 或 main() 的情况下创建验证密码的函数,并将返回 true 或 false