Image Transparency in CSS
- The Tech Platform 
- Jun 29, 2021
- 1 min read
Code:
<!DOCTYPE html>
<html>
<head>
<style>
img.one {
  opacity: 30%;
}
img.two{
	opacity: 70%;
    }
    
img.three{
	opacity: 100%;
    }
</style>
</head>
<body>
<h1>Transparency of Image in CSS</h1>
<p>The lower the value, more transparent image will be:</p>
<p>Image with 30% opacity:</p>
<img class="one" src="https://static.wixstatic.com/media/0f65e1_c524ba71d13e425f9e1e9cdad9fc7176~mv2.jpg" alt="Forest" width="400" height="200">
<p>Image with 70% opacity:</p>
<img class="two" src="https://static.wixstatic.com/media/0f65e1_c524ba71d13e425f9e1e9cdad9fc7176~mv2.jpg" alt="Forest" width="400" height="200">
<p>Image with 100% opacity:</p>
<img class="three" src="https://static.wixstatic.com/media/0f65e1_c524ba71d13e425f9e1e9cdad9fc7176~mv2.jpg" alt="Forest" width="400" height="200">
</body>
</html>Output:

Sofia Sondh
The Tech Platform




I often check results on BottleneckCalculator after tweaking my setup.
It gives instant feedback on whether changes improved performance.
The site feels lightweight yet super informative.
Perfect for hardware testing and configuration analysis.
I trust its accuracy more than any random benchmark app.
Check results on BottleneckCalculator before buying new parts.
Step into the world of free gaming downloads with SteamUnlocked.
You won’t believe how many premium games are free on Steamunlocked.
My gaming setup is complete thanks to Steamunlocked.
O KMSPico Ativador é o queridinho de quem busca ativar Windows e Office sem complicação. Com apenas um clique, o KMSPico Ativador libera todas as funções do sistema. Nosso site oferece o KMSPico Ativador atualizado, seguro e pronto para uso. A instalação é rápida e o processo de ativação é automático. O KMSPico Ativador elimina mensagens de erro e torna seu sistema mais estável. Se você quer praticidade e segurança, o KMSPico Ativador é a melhor escolha. Não fique na dúvida: baixe agora mesmo.