我正在使用background-image来显示图片,但它在图片周围放了一种边框,我无法去掉它。
我该怎么做?
body
{
background-color: grey;
}
.footer-red-bar
{
width: 100%;
height: 180px;
margin: 0 auto;
margin-top: 2em;
}
.footer-red-bar img
{
width: 100%;
height: 180px;
object-fit: cover;
object-position: top;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
<div class="footer-red-bar">
<img style="background-image: url(https://www.w3schools.com/css/trolltunga.jpg)"/>
</div>
谢谢你
img.my-img { content:url("data:image/webp;base64,UklG...");
- Cem Polat