【发布时间】:2020-08-16 03:38:04
【问题描述】:
现在我在 Magento 2 中工作。当我在 google chrome 中调整大小时,我遇到了一个问题,即带有按钮的背景图像不会保持不变。
.botones1 {
position: absolute;
left: 400px;
font-size: 22px;
color: white;
text-decoration: none;
font-weight: bold;
background-color: #357b2b !important;
}
.botones1:hover {
background-color: #9FCD4C !important;
}
.botones2{
position: absolute;
left: 796px;
font-size: 22px;
color: white;
text-decoration: none;
font-weight: bold;
background-color: #357b2b !important;
}
.botones2:hover {
background-color: #9FCD4C !important;
}
<div class="container">
<img src="https://placeimg.com/1000/480/any" alt="Smiley face">
<a class="button botones1" href="#">Buy Coupon</a>
<a class="button botones2" href="#">Sell Coupon</a>
</div>
当我使用移动设备进入时,我想要背景图像,并且按钮以响应方式调整大小,我希望它们保持在同一个位置。
谢谢。
【问题讨论】:
标签: css image button background responsive