1 개요[ | ]
- CSS Tooltip
- CSS 툴팁
html
Copy
<style>
.tooltip {
cursor: pointer;
}
.tooltip .tooltiptext {
display: none;
background: #000;
color: #fff;
width: 120px;
border-radius: 5px;
padding: 5px;
font-size: 14px;
text-align: center;
position: absolute;
z-index: 9;
}
.tooltip:hover .tooltiptext {
display: inline;
}
</style>
<button class="tooltip">Button1
<span class="tooltiptext">Hello, World!</span>
</button>
<hr>
<button class="tooltip">Button2
<span class="tooltiptext">Hi, there!<br>Are you my mother?</span>
</button>
2 같이 보기[ | ]
3 참고[ | ]
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.