简体   繁体   中英

HTML / CSS Transparent Image Keeps showing background

I am trying to insert a logo into the header of my webpage, and although it is transparent when I save it locally, it still shows a grid when the URL is inserted into my stylesheet. How can I get rid of that ugly grid in the logo?

header {
      background-color: #5C9632;
      background-image: url(https://library.kissclipart.com/20190218/sgq/kissclipart-cartoon-snake-logo-clipart-snakes-logo-9150a5362e4635c4.png);
      background-repeat: no-repeat;
      background-size: 100px 100px;
}

在此处输入图像描述

DO: You just need to download the image from https://www.kissclipart.com/ using the Free Download button.

DON'T Using right-click, then Save Image, it will get you the grid photo.

Your CSS code is fine.

Here is image without background;)

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM