'I have a transparent image to use in my html code in vscode but when I open it with live server the image doesn't get transparent
please help me in understanding my error of the code, in why the transparent images with .png extension are not getting transparent.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>First Page</title>
</head>
<body>
<h1>IMAGES:</h1>
<br>
<p><b>1</b></p><br>
<img src="https://www.pinpng.com/pngs/m/77-779483_anime-guy-wolf-deity-anime-pics-cute-boys.png" alt="Image not found">
</body>
</html>
Solution 1:[1]
The image isn't with a transparent background. It's with a 'transparent' grid background, so it looks/fakes like it's transparent but it isn't.
Solution 2:[2]
You have downloaded the file on the display page. This is a JPEG file with a .png
extension.
If you press the Free Download
button you get a PNG with transparency
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Kip |
Solution 2 | rioV8 |