【发布时间】:2020-01-20 17:24:41
【问题描述】:
#logo-center {
max-width: 100%;
height: auto;
display: flex;
}
@media only screen and (min-width:991px) {
.logo-div {
-webkit-margin-start: -5%;
-webkit-margin-end: -15%;
-webkit-margin-before: -6%;
left: 40%;
top: 40%;
right: 40%;
position: absolute;
z-index: 100;
display: flex;
}
}
@media only screen and (max-width:990px) {
.logo-div {
-webkit-margin-start: -5%;
-webkit-margin-end: -15%;
-webkit-margin-before: -6%;
left: 40%;
top: 42%;
right: 42%;
position: absolute;
z-index: 100;
}
}
@media only screen and (max-width:700px) {
.logo-div {
left: 38%;
top: 43%;
right: 40%;
position: absolute;
z-index: 100;
}
}
@media only screen and (max-width:500px) {
.logo-div {
left: 35%;
top: 42%;
right: 40%;
position: absolute;
z-index: 100;
}
}
<div class="logo-div">
<div id="logo-center"><img style="border-radius: 7%;" src="https://www.crockerriverside.org/sites/main/files/main-images/camera_lense_0.jpeg"></div>
</div>
https://jsfiddle.net/8rmL5a7f/ 我需要在中心调整图像大小(以便在 mozilla/chrome/ie 中做出响应)并将其设置在页面中心以覆盖表格边框相交的十字。 我的代码仅适用于 Firefox,但不适用于 chrome 或 IE。 任何人都可以帮助我知道为什么?
【问题讨论】:
-
在
#logo-center img添加width:100%;和height:auto;就是这样!在我的测试中有效。如果是,请让我知道作为答案发布给您,您可以将其作为正确答案。 -
好吧,我失败了。成功了!非常感谢!
标签: html css html-table bootstrap-4 responsive