adc

clicks

gradient color overlay in html and css

 To add a gradient overlay to a text element, we need to set three different CSS properties to the text we want to style: background-image: <gradient> background-clip: text. text-fill-color: transparent.

HTML
Before we start writing code first, we need to create a primary structure of the HTML document, so that the browser can understand and start working. The basic HTML structure looks like the following.
After writing the primary structure of the HTML document, you will also write the tags and content you need. After that, you can see the output in your browser. We know that HTML Sudu Mae is used for exposing content in a basic format. To complete our content we need to use CSS, which is an HTML insert and it creates an engaging user interface.

<!DOCTYPE html>

<html>

<head>

               <title>Gradient Color Overlay</title>

               <style type="text/css">

 

                              body{

                                             margin: 0;

                              }

                              h2{

                                             line-height: 800px;

                                             font-size: 65px;

                                             margin: auto;

                              }

                              .main{

                                             background:linear-gradient(rgba(52, 152, 219,0.7),rgba(231, 76, 60,0.7));

                                             }

                                     </style>

</head>

<body>

               <div class="main">

                              <h2>Hey Gays! How ar you?</h2>

               </div>

</body>

</html>



Source Code





gradient color overlay in html and css gradient color overlay in html and css Reviewed by easycoding on August 26, 2020 Rating: 5

No comments:

Powered by Blogger.