JSFiddle - React, Tailwind, and code Playground

by xxxvvvxxx

HTML

<div id="login_form">
	<a href="index.html">
		<img src="https://kin-phinf.pstatic.net/20230521_84/1684666298541hB0J5_PNG/login_form_button.png?type=w750" alt="로그인 버튼"/>
		<span>로그인</span>
	</a>
	<div class="menu">
		<a href="index.html" class="left">개인</a>
		<a href="index.html" class="right">기업</a>
	</div>
</div>

CSS

#login_form a {
	position: relative;
	display:block;
}
#login_form > a, #login_form a img {
	width: 115px;
	height: 50px;
}
#login_form {
	position: relative;
}
#login_form span {
	position: absolute;
	left: 0;
	margin: 0;
	position: absolute;
	top: 50%;
	left: 50%;
	-ms-transform: translate(-30%, -50%);
	transform: translate(-30%, -50%);
	color: white;
}
#login_form a:hover .menu {
	margin-bottom: 5px;
}
#login_form:hover .menu {
	display: flex;
}
.menu {
	display: none;
	height: 45px;
	width: 134px;
	gap: 30px;
	justify-content: center;
	align-items: center;
	background-image: url("https://kin-phinf.pstatic.net/20230521_173/1684666298846nnsn1_PNG/login_Label.png?type=w750");
	background-repeat: no-repeat;
}