<div class='pcb_box'>
    <form action='/search' class='pcb_search' method='get'>
      <input class='pcb_input' name='q' placeholder='Tìm kiếm...' type='text'/>
      <button class='pcb_button' type='button'>
    </button></form>
  </div>
<p><a href='https://www.phucuongblogger.info/2018/07/khung-tim-kiem-hieu-ung-mo-rong-dep-cho-blogspot.html' title='' rel='nofollow' target='_blank'>Get this search box</a></p>
body {
  margin: 0;
  padding: 0;
  background: #01A9DB;
}
.pcb_box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
}
.pcb_input {
  width: 50px;
  height: 50px;
  background: none;
  border-radius: 50%;
  border: 3px solid #fff;
  box-sizing: border-box;
  outline: 0;
  transition: width 0.4s ease-in-out, border-radius 0.8s ease-in-out, padding 0.2s;
  transition-delay: 0.4s;
  color: #fff;
  font-size: 18px;
}
.pcb_input::placeholder {
  padding:0 45px;
  color: #fff;
  font-size: 20px;
}
.inclicked {
  width: 350px;
  border-radius: 3px;
  padding: 0 15px;
  padding-right: 35px;
}
.pcb_button {
  position: absolute;
  width: 50px;
  height: 50px;
  top: 0;
  right: 0;
  box-sizing: border-box;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
}
.pcb_button::before {
  content: '';
  width: 3px;
  height: 18px;
  background: #fff;
  position: absolute;
  transform: rotate(-45deg);
  bottom: -10px;
  right: -3px;
  transition: 0.3s;
}
.close::before, .close::after {
  content: '';
  width: 3px;
  height: 25px;
  background: #fff;
  position: absolute;
  bottom: 12px;
  right: 25px;
}
.close::before {
  transform: rotate(-45deg);
}
.close::after {
  transform: rotate(45deg);
}
a {
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-family: sans-serif;
  position: absolute;
  top: 65%;
  left: 51%;
  transform: translate(-50%,-50%);
}
$('.pcb_button').on('click',function(){
  $('.pcb_input').toggleClass('inclicked');
  $('.pcb_button').toggleClass('close');
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js