如何从图像中删除白色?

时间:2017-07-13 07:35:42

标签: html css image

设计师给我发了一个页脚图片(footer-logo.png)。图像的右侧有弧形,其余部分是透明的。当我将图像添加到html代码时,我得到白色像素?为什么?

Here is the image to add

以下是白色部分:

enter image description here

用于添加图片的代码:

<div class="copyright footer-copyright">
<div class="footer copy-content">
<div class="container-fluid bg-3 text-center">
<div class="row">
<div id="footer-main-1" class="col-sm-2"><img class="footer-logo" alt="example" /></div>
<div id="footer-main-2" class="col-sm-7">
<div class="row">
<div id="footer-title" class="col-sm-12"><span><b>Online store</b></span></div>
<div id="footer-par-1" class="col-sm-6"><em class="fa fa-map-marker">&nbsp;</em>Headquarters: <span>Address Here</span></div>
<div id="footer-par-3" class="col-sm-3"><em class="fa fa-envelope">&nbsp;</em>Email: <a style="color: #ffffff;" href="mailto:support@example.com"><span>support@example.com</span></a></div>
<div id="footer-par-2" class="col-sm-3"><em class="fa fa-fax">&nbsp;</em>Toll free: <a style="color: #ffffff;" href="tel://000000000">000000000</a></div>
</div>
</div>
<div id="footer-main-3" class="col-sm-3">
<div class="footer-paylink" style="float: right; width: auto;">
<div class="footer_links"><a class="fisrt" href="{{store url=""}}">Home</a><a href="/about-us">About Us</a><a class="last" href="/contact">Contact Us</a></div>
</div>
</div>
</div>
</div>
</div>

这是图像和背景颜色的CSS:

.footer-logo{
    content:url("path-to-image/footer-logo.png");
    margin-right:20px;
}
.copyright{
    padding:0px 0px ;
    background: linear-gradient(to right, rgba(160,5,250,1) 1%, rgba(160,5,250,1) 6%, rgba(180,51,255,1) 24%, rgba(184,61,255,1) 47%, rgba(177,61,245,1) 68%, rgba(165,34,241,1) 79%, rgba(165,34,241,1) 100%) ;
}

如何删除白色像素?

1 个答案:

答案 0 :(得分:0)

使用photoshop图像在圆弧上有一个小的白色边框

<强> 原始

enter image description here

黑色背景

enter image description here

修改图片。