<form>
<div class="fx fx-gap">
<div>
<input type="text" placeholder="Search" required />
</div>
<div id="search-icon">
<button type="submit">
<div id="search-icon-circle"></div>
<span></span>
</button>
</div>
</div>
</form>
html,
body {
height: 100%;
}
body {
margin: 0;
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
background-color: #ffd8d8;
}
.fx {
display: flex;
}
.fx-gap {
gap: 18px;
}
input,
button {
color: #fff;
padding: 0;
margin: 0;
border: 0;
background-color: transparent;
outline: none;
}
form {
position: absolute;
top: 50%;
left: 0;
right: 0;
width: 550px;
height: 96px;
padding: 35px;
margin: -83px auto 0 auto;
background-color: #ff7575;
border-radius: 20px;
box-shadow: 0 10px 40px #ff7c7c, 0 0 0 20px #ffffffeb;
transform: scale(0.6);
}
input[type="text"] {
width: 100%;
height: 96px;
font-size: 60px;
line-height: 1;
}
input[type="text"]::placeholder {
color: #e16868;
}
button {
position: relative;
display: block;
width: 84px;
height: 96px;
cursor: pointer;
}
#search-icon-circle {
position: relative;
top: -8px;
left: 0;
width: 43px;
height: 43px;
margin-top: 0;
border-width: 15px;
border: 15px solid #fff;
background-color: transparent;
border-radius: 50%;
transition: 0.5s ease all;
}
button span {
position: absolute;
top: 68px;
left: 43px;
display: block;
width: 45px;
height: 15px;
background-color: transparent;
border-radius: 10px;
transform: rotateZ(52deg);
transition: 0.5s ease all;
}
button span:before,
button span:after {
content: "";
position: absolute;
bottom: 0;
right: 0;
width: 45px;
height: 15px;
background-color: #fff;
border-radius: 10px;
transform: rotateZ(0);
transition: 0.5s ease all;
}
#search-icon:hover #search-icon-circle {
top: -1px;
width: 67px;
height: 15px;
border-width: 0;
background-color: #fff;
border-radius: 20px;
}
#search-icon:hover span {
top: 50%;
left: 56px;
width: 25px;
margin-top: -9px;
transform: rotateZ(0);
}
#search-icon:hover button span:before {
bottom: 11px;
transform: rotateZ(52deg);
}
#search-icon:hover button span:after {
bottom: -11px;
transform: rotateZ(-52deg);
}
#search-icon:hover button span:before,
#search-icon:hover button span:after {
right: -6px;
width: 40px;
background-color: #fff;
}
This Pen doesn't use any external JavaScript resources.