how to build centralized animated search bar

To build an animated search bar let's quickly start here some of  the important steps are taken the follow 

1 open VS code 2 create file index.html and style.css 3 code in html file to build the structure of animated search bar 4 code in style.css file to style the html document




if you don't understood watch the video


index.html file code

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
  <p>Animated search bar</p>
  <form>
    <input type="text" name="search" placeholder="Search..">
  </form>
</div>
</body>
</html>

style.css

* {
    padding: 0;
    margin: 0;
}

body {
    font-family: sans-serif;
    text-decoration: none;
    font-size: 22px;
    text-align: center;
    padding: 10px;
}

.container {
    padding: 7px;
    box-shadow: 0 0 10px 0;
    border: 2px solid rgb(57, 122, 57);
    border-radius: 10px;
    margin: 4px;
}

input[type=text] {
    width: 130px;
    box-sizing: border-box;
    border: 2px solid #5a5a5a;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    background-repeat: no-repeat;
    padding: 10px 20px 10px 40px;
    -webkit-transition: width 0.4s ease-in-out;
    transition: width 0.4s ease-in-out;
  }  
input[type=text]:focus {
    width: 100%;
  }





Comments

Master Template

Login and Signup form/page

Make Login and Signup form in bootstrap