속성을 가진 모든 요소에 툴팁 요소 인 .appends()
이있는 글로벌 자바 스크립트 함수가 있습니다.앵커의 하위 텍스트 장식을 제거 할 수 없습니까?
내가 툴팁에 text-decoration
규칙을 제거 할 수없는 것 때문에 CSS를 깰 것 같다 data-tooltip
속성 nchor a
을 제공하려고 때까지 모든 멋지다.
앵커의 하위에서 text-decoration
을 어떻게 제거합니까?
밑줄은 기본 앵커 색상 밑줄이 있으므로 부모 앵커에서 분명히 상속되지만 툴팁 텍스트의 color
은 주황색입니다.
내가 무슨 말을하고 있는지 더 명확하게 이해하려면 http://img.ly/35kc을 참조하십시오.
업데이트 여기
툴팁 내 CSS는, 요청에 따라
/*TOOLTIPS*/
.tooltip_placeholder {
position: relative;
width: 0px;
height: 0px;
white-space:nowrap;
display: inline;
z-index: 100;
text-decoration: none;
}
.tooltip_boundary {
position: absolute;
width: 300px;
z-index: 100;
text-decoration: none;
}
.tooltip_border {
z-index: 100;
background: url(/sales/global/images/tooltip_arrow.png) no-repeat;
padding-left: 35px; /*left offset*/
background-position: 16px 0px;
float: left;
z-index: 100;
text-decoration: none;
}
.tooltip {
padding: 8px;
color: #A97D35;
background: #FBF98E;
-moz-border-radius: 0px 8px 8px 8px;
border-radius: 0px 8px 8px 8px;
border: 6px solid #F9E98E;
font-size: 12px;
text-transform: none;
z-index: 100;
text-decoration: none;
}
이 툴팁에 넣어하는 방법이다 :
$(element).append('<div class="tooltip_placeholder"><div class="tooltip_boundary"><div class="tooltip_border" style="display: none;"><div class="tooltip">'+$(element).attr('data-tooltip')+'</div></div></div></div>')
업데이트 2
@Guffa 님이 친절하게이 내용을 보냈습니다 http://jsfiddle.net/TxRmk/ Safari 나 Chrome이 아닌 FF로 작동하도록 브라우저 특정 문제가있는 것 같습니다. IE를 확인하지 않았지만 완전히 다른 것을 수행합니다.
CSS를 게시 할 수 있습니까? 그렇지 않으면 어둠 속에서 ... – TNC
'a.iHasAToolTip .toolTipElement {text-decoration : none}'? – thirtydot
HTML/CSS를 게시하십시오. 그것은 CSS 특이성의 문제처럼 들립니다. 이전에 언급 한 것과 같은 선택기로 충분할 수 있습니다. – thirtydot