Html Search With Animated input Code
<!DOCTYPE html>>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="nav.css">
<title>Html Form</title>
</head>
<body>
<p>Animated Search input</p>
<form>
<input type="text"name="Search"placeholder="Search">
</form>
</body>
</html>
CSS Animated Style
input[type=text]{
width:130px;
box-sizing: border-box;
border:2px solid #ccc;
border-radius:4px;
font-size:16px;
background-color: white;
background-image: url(searchicon.png);
background-position:10px 10px;
background-repeat: no-repeat;
padding:12px 20px 12px 40px;
transition:width 0.4s ease-in-out;
}
input[type=text]:focus{
width:100%;
}
No comments:
Post a Comment