adc

clicks

layout hover effect using css | hover effect in html & css

 

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>Hover Effect</title>
               <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
 
                <div class="container">
                              <div class="box"></div>
                              <div class="box"></div>
                              <div class="box"></div>
                              <div class="box"></div>
                              <div class="box"></div>
               </div>
</body>
</html>

 CSS 

Now, we have time to improve the HTML content, for that, we need to add CSS to the HTML file. CSS can be added to HTML documents in a total of three ways, here we are using outside CSS design using CSS will arrive here after typing and see the output in your browser.


body{
               background: blue;
} .container{
               margin: 100px auto;
               padding: 20px;
               width: 90%;
               background: #ddd;
               display: flex;
               flex-direction: row;
               justify-content: center;
} .box{
               width: 250px;
               height: 300px;
               background: orange;
               margin: 0px 10px;
               transition: 1s;
}.box:hover{
               transform: scale(1.3);
               background: #994c00;
               z-index: 1;
               box-shadow: 2px 2px 2px #000;
}

 

Source Code



 

layout hover effect using css | hover effect in html & css layout hover effect using css | hover effect in html & css Reviewed by easycoding on August 26, 2020 Rating: 5

No comments:

Powered by Blogger.