Saturday, May 13, 2017

Animated Search Box

The Search (engine) box is the input text box which input the some words from user and by the help of that words generate some results or search to the whole website for matching results. Every webpage has their own search engine. However, there other world class search engine who provide custom webpage search engine package like Google.

To perform animated search box, you will need to create a html/php (web page), CSS code and a search logo.
 Search Icon

Now, create a page, copy and paste it and save it YourName.html

<!DOCTYPE html>
<html>
<head>
<style type="text/css"> 
input[type=text] {       /* #search {  */
    width: 30%;
    box-sizing: border-box;
    border: 2px solid lime;
    border-radius: 4px;
    font-size: 15px;
    background-color: black;
    color: yellow;
    background-image: url('ls-mini-icon20.png');
    background-position: 10px 10px; 
    background-repeat: no-repeat;
    padding: 12px 20px 12px 40px;
    -webkit-transition: width 0.6s ease-in-out;
    transition: width 0.6s ease-in-out;
}
input[type=text]:focus {        /* #search:focus {  */
    width: 100%;
    color: lime;
}
</style>
</head>
<body>
<p>Animated search Box Example:</p>
<form method="post">
  <input type="text" id="search" name="search" placeholder="Search..">
</form>
</body>
</html>

Output of the following example:


Note: you can change CSS as your requirements.

No comments:

Post a Comment

Recent Post

कति अंक ल्याउँदा कुन ग्रेड र कति जीपिए हुन्छ ?

माध्यमिक शिक्षा परीक्षा एसईई परीक्षाको नतिजा शुक्रबार प्रकाशित भएको छ । नियमिततर्फ ४ लाख ४५ हजार ५६४ जना सफल भएका छन् भने एक्जाम्टेड तर्फ ...

Most Popular