2017-07-13 85 views
1

设计师给我发送了页脚图像(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:[email protected]"><span>[email protected]</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%) ; 
} 

如何去除白色像素?

+3

使用photoshop? – Hash

+0

它在Photoshop中是透明的! – Mohammad

+1

它有一点白色边框 – Hash

回答

0

使用Photoshop图像有一个白色的小边框的圆弧

原始

enter image description here

黑色背景

enter image description here

编辑图片。

+1

我可以使用html和css创建一个像图片一样的弧线吗? – Mohammad

+0

是的,你可以创建。 – Hash

+0

http://www.css3.info/preview/rounded-border/ – Hash