<form action="#" class="search">
	<input type="text" class="search__input" placeholder="click me for animation">
	<button href="#" class="search__button">
		GO
	</button>
</form>
*,
*::after,
*::before {
	padding: 0;
	margin: 0;
	box-sizing: border-box;
}

html {
	font-size: 62.5%;
	font-family: Georgia;
}

body {
	box-sizing: border-box;
	background-image: linear-gradient(to right bottom, purple, crimson);
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
}


.search {
	display: flex;
	align-items: stretch;
	justify-content: center;
	width: 40rem;
	
	&__input {
		font-family: inherit;
		width: 80%;
		height: 3.5rem;
		border-radius: 100px;
		outline: none;
		border: none;
		transition: .2s;
		padding: 1.5rem;
		margin-right: -3.4rem;
		
		&:focus {
			width: 100%;
			background: #fff;
		}
		
		&::-moz-input-placeholder {
			font-weight: 800;
		}
		
		&::-webkit-input-placeholder {
			font-weight: 600;
		}
		
		&::input-placeholder{
			font-weight: 800;
		}
	}
	
	&__button {
		width: 3.5rem;
		border-radius: 100px;
		border: none;
		outline: none;
		cursor: pointer;
		background: #fff;
		
		&:hover {
			background-image: linear-gradient(to right bottom, crimson, purple);
		}
	}
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.