0

HTML When I am run this code it has shown me both opacity decrease background and text.

<!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>Document</title>
<style>
    #h1{
        background-color: rgb(81, 5, 151); 
        opacity: 0.8; 
    }
</style>
</head>
<body>
    <h1 id="h1">Change only background opacity not text. When I am run this code it has shown  me both opacity decrease background and text.<y /h1>  Here I have taken h1 and give id 
</body>
</html>

1 Answers1

-1

By decreasing this values such as 0.7 or 0.5 will help you to change the Transparency or opacity of the background image