css 질문입니당.. 채택완료
Copy
.position > ul > li > a:after {content:'';display:block;margin:-5px auto 0;width:1px; border:10px solid transparent; border-bottom-color:#000}
이렇게 해서 a 태그 뒤에 윗방향 삼각형을 만들었는데
a태그에 올렷을때만 나오게 어떻게 할까요? ㅠㅠㅠ
Copy
.position > ul > li > a:hover .position > ul > li > a:after {content:'';display:block;margin:-5px auto 0;width:1px; border:10px solid transparent; border-bottom-color:#000}
이렇게 했더니 안나오네요 ㅠㅠㅜㅜ
답변 2개
채택된 답변
+20 포인트
6년 전
Copy
.position > ul > li > a:after {display: none;}
.position > ul > li > a:hover:after {display: block;}
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
6년 전
.position > ul > li > a:hover {content:'';display:block;margin:-5px auto 0;width:1px; border:10px solid transparent; border-bottom-color:#000}
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인