Answer the question
In order to leave comments, you need to log in
How to make the background of an image transparent in html?
I made png from jpg by deleting it with an eraser in Photoshop and saved it as png and added it to html through the img tag
. It should have come out without a white background, but for some reason it is
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Popit.ru - Главная</title>
<style> a {
text-decoration: none;
}
a:hover {
text-decoration: none;
}</style>
</head>
<body>
<header class="header">
<div class="header__text">
<a href="">
<h2 class="pop" id="pc">Поп-иты</h2>
<h3 class="pop" id="mobile">Поп-иты</h3>
</a>
<a href="">
<h2 class="simple" id="pc">Симпл-димплы</h2>
<h3 class="simple" id="mobile">Симпл-димплы</h3>
</a>
</div>
</header>
<div class="content">
<div class="about">
<img src="popit.svg" alt="">
</div>
</div>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Apparently something was wrong in Photoshop, and the second option will help css opacity
Either I have a mistake or the photo is broken, but I just don’t see it.
I would venture to suggest that if the picture has a background, then remove it only in Photoshop or similar programs, otherwise, if the picture has no background, but your page has a background, then your image is a child of an element that has a background.
Photoshop needs to be mastered. Just rubbing with an eraser in the original jpg will not help.
https://youtu.be/awz-RjRF6E4
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question