I want to leave the background image transparent without affecting the other items of the body, only the image, but when I place the opacity the entire site becomes transparent, if in case it does not have as good practice I use the img tag as image background?
This is the html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Formularios</title>
<link rel="stylesheet" href="formularioscss/formularios.css" type="text/css"/>
</head>
<body>
<header class="cabecalho">
<!-- <img src="imagens/faculdade_impacta_azul.jpg" alt=""> -->
<ul>
<li><a href=""> Home</a></li>
<li>Lista de Cursos</li>
<li>Noticias</li>
</ul>
</header>
<div class="tran">
<!--<img src="D:/Apache24/htdocs/TecWeb/EP_TecWeb/Formularios/Imagens/Fundo_Login.png" alt="">-->
</div>
<form method="GET" action="" class="formLogin">
<label for="Login">Login</label>
<p><input type="login" name="login" id="login"></p>
<label for="senha">senha</label>
<p><input type="password" name="senha" id="senha"></p>
</form>
</body>
This is the css snippet that I want to leave the transparent background image:
body {
background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.4)),
url("D:/Apache24/htdocs/TecWeb/EP_TecWeb/Formularios/Imagens/Fundo_Login.png");
background-attachment: fixed;
background-size: 100%;
background-repeat: no-repeat;
font-family: 'PT Sans', sans-serif;
}