LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Search Bar UI Animation

CSS
form {
  background: grey;
  width: 100%;
  max-width: 400px;
  padding: 20px;
  margin: 30px auto;
}
form h1 {
  margin-top: 0;
  color: #fff;
}

.search-bar {
  position: relative;
}
.search-bar input[type="text"] {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  height: 30px;
  width: 30px;
  padding: 3px 3px 3px 26px;
  border: 1px solid #999;
  border-radius: 4px;
  font-size: 14px;
  -webkit-transition: width 0.4s ease;
  transition: width 0.4s ease;
}
.search-bar input[type="text"]:hover, .search-bar input[type="text"]:focus {
  width: 150px;
  padding-left: 26px;
}

.search-bar i {
  position: absolute;
  top: 8px;
  left: 9px;
  border-radius: 4px;
  font-size: 13px;
  pointer-events: none;
  color: #333;
}

Description

A fun search bar UI animation where the search bar looks like a square search icon and turns into a search box on hover.
Term
Wed, 12/27/2017 - 06:57

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv