◎ Tooltip
- .tooltiptext의 margin-left > width:100px + padding: 8px
= (100px / 2) + 8px
= 58px > margin-left
- margin-left: (width/2) + padding
- tooltip & arrow tooltip
right |
right-arrow |
top: -5px left: 105% |
top: 50% right: 100% |
left |
left-arrow |
top: -5px right: 105% |
top: 50% left: 100% |
top |
top-arrow |
width: 120px bottom: 100% left: 50% margin-left: -60px |
top: 100% left: 50% |
bottom |
bottom-arrow |
width: 120px top: 100% left: 50% margin-left: -60px |
bottom: 100% left: 50% |
- arrow (ex. bottom-arrow)
- create arrow (using border)
- .tooltiptext::after
- ex. bottom-tooltip
'WEB PROGRAMMING > CSS' 카테고리의 다른 글
Dropdown (0) | 2017.11.23 |
---|---|
Opacity, Navigation Bar (0) | 2017.11.23 |
Pseudo-element (0) | 2017.11.14 |
Pseudo-class (0) | 2017.11.14 |
Combinator (0) | 2017.11.14 |