일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- CGIMALL
- 게시판
- 홈페이지
- #솔루션
- #happycgi
- #image
- 솔루션
- 사이트제작
- 홈페이지제작
- #이미지
- #동영상
- javascript
- #업종별
- happycgi
- #뉴스
- #CSS
- #해피CGI
- #웹솔루션
- #홈페이지
- 해피씨지아이
- #쇼핑몰
- 이미지
- 웹솔루션
- jquery
- CSS
- #cgimall
- 해피CGI
- #홈페이지제작
- #jQuery
- php
- Today
- Total
웹솔루션개발 25년 노하우! 해피CGI의 모든것
[해피CGI][cgimall] 화살표로 표시되는 Smart jQuery 툴팁 - HoverMe 본문
HoverMe는 스마트 화살표 위치를 사용하여 애니메이션이 적용된 사용자 정의 툴팁을 만드는 가벼운 jQuery 플러그인입니다.
툴팁 크기나 요소 크기에 관계없이, 마우스를 올려놓은 요소의 중앙을 직접 가리키도록 화살표 배치를 자동으로 계산합니다.
# 라이센스 : MIT
# 사용방법
1. HEAD 에 CSS 추가 합니다.
기본적으로 hoverMe.css 만 있어도 됩니다.
<link rel="stylesheet" href="hoverMe.css">
<style>
html,* { font-family: 'Inter'; }
body { background-color: #fafaf8; line-height:1.6;}
.lead { font-size: 1.5rem; font-weight: 300;background: linear-gradient(to right, #000000 0%, #000000 50%,#999999 100%);
-webkit-background-clip: text;
-webkit-text-fill-color:transparent; }
.container { margin: 20px auto; max-width: 960px; }
h1 {
background: linear-gradient( 120deg, #bd34fe 30%, #41d1ff );
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
button {
margin: 20px;
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
}
.wide-button {
width: 200px;
}
.narrow-button {
width: 200px;
}
</style>
2. 라이브러리 호출
<script src="hoverMe.js"></script>
3. 요소와 툴팁의 속성을 정합니다.
<button data-title="Tooltip Content A" data-position="top" data-color="#059669" data-text-color="#fff">Hover Me</button>
<button data-title="Tooltip Content B" data-position="bottom" data-color="#1f2937" data-text-color="#f9fafb">Hover Me</button>
<button data-title="Tooltip Content C" data-position="left" data-color="#10b981" data-text-color="#fff">Hover Me</button>
<button data-title="Tooltip Content D" data-position="right" data-color="#059669" data-text-color="#fff">Hover Me</button>
<button data-title="Tooltip Content E" data-color="#059669" data-text-color="#fff">Hover Me</button>
<button data-title="Tooltip Content F" data-color="#1f2937" data-text-color="#f9fafb">Hover Me</button>
<button data-title="Tooltip Content G" data-color="#10b981" data-text-color="#fff">Hover Me</button>
4. 함수를 호출하여 적용 합니다.
<script>
$("[data-title]").HoverMe({
position: 'top',
color: '#333',
textColor: '#fff',
borderRadius: '4px',
fontSize: '14px',
padding: '6px 10px'
});
</script>
'웹프로그램밍 자료실 > JAVA 자료' 카테고리의 다른 글
[해피CGI][cgimall] 인라인 이미지 Crop/Resize/Zoom/Pan 플러그인 - mosaico-cropper (0) | 2025.09.25 |
---|---|
[해피CGI][cgimall] 간단한 이미지 내부 확대/축소 플러그인 - jQuery Zoom (0) | 2025.09.23 |
[해피CGI][cgimall] 텍스트 URL을 링크로 변환 - linkify (0) | 2025.09.04 |
[해피CGI][cgimall] 드래그 앤 드랍으로 폼 생성하기 (0) | 2025.09.03 |
[해피CGI][cgimall] 다양한 모양의 프로세서바 - loading-bar (0) | 2025.08.29 |
Comments