STEP. 1
1 2 3 | <span class="apple"> <span class="tooltip">준비중입니다.</span> </span> | cs |
STEP. 2
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | span.apple span.tooltip{ border-radius: 5px; background: #ebd7ad; top:5px; color: #38291f; display: block; left: 110%; margin-bottom: 15px; opacity: 0; padding: 10px; pointer-events: none; position: absolute; width: 100px; -webkit-transform: translateY(10px); -moz-transform: translateY(10px); -ms-transform: translateY(10px); -o-transform: translateY(10px); transform: translateY(10px); -webkit-transition: all .25s ease-out; -moz-transition: all .25s ease-out; -ms-transition: all .25s ease-out; -o-transition: all .25s ease-out; transition: all .25s ease-out; -webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); -moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); -ms-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); -o-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); } #section01 #content01 #content span.apple span.tooltip:before{ bottom: -20px; content: " "; display: block; height: 20px; left: 0; position: absolute; width: 100%; } #section01 #content01 #content span.apple span.tooltip:after{ border-right: solid #ebd7ad 10px; border-top: solid transparent 10px; border-bottom: solid transparent 10px; border-left: solid transparent 10px; content: " "; height: 0; left: 0%; margin-left: -17px; position: absolute; width: 0; } #section01 #content01 #content span.apple:hover span.tooltip{ opacity: 1; pointer-events: auto; -webkit-transform: translateY(0px); -moz-transform: translateY(0px); -ms-transform: translateY(0px); -o-transform: translateY(0px); transform: translateY(0px); } | cs |
결과물 :
before와 after를 좀 더 알아야 할 듯.
'퍼블리싱 > CSS' 카테고리의 다른 글
box-sizing (0) | 2016.02.11 |
---|---|
백그라운드이미지와 배경색을 겹치기 (0) | 2016.01.15 |
고정페이지에서 스크롤 만들기 (0) | 2016.01.14 |
가로스크롤바 없애기 (1) | 2016.01.14 |
텍스트에 그림자효과 넣기 (0) | 2016.01.13 |