나는 호버 동안 변경 위치와 함께 팝업을 보여주는 아래의 코드를 사용했다. 내 문제는 마우스를 놓은 후 호버 파트가 이전 위치로 설정되어 있지 않다는 것입니다.마우스를 올려 놓은 상태에서 div 위치를 어떻게 바꿀 수 있습니까?
어떻게 바이오 정보 팝업을 닫을 수 있습니까?
HTML
<ul class="ch-grid">
<li>
<div class="bioinfo">
<h2>tooltips</h2>
/div>
CSS
.bioinfo {
display: none;
max-height: auto;
max-width: 220px;
overflow: hidden;
border-radius: 10px;
box-shadow: rgba(108,108,108, 0.5) 5px 5px 5px;
border: 2px solid #ccc;
position: absolute;
top: 150px;
right: -150px;
z-index: 100;
/* background: #eeeded; f6f6f6*/
background: rgba(246,246,246, 0.8);
font-size: 10px;
padding: 15px 3px 3px 3px;
text-align: justify;
}
jQuery를 할 수있는 내가 MOUS 후 위치를 다시 설정하는 방법
$('.ch-grid > li').hover(function() {
//$('.ch-item').click(function() {
//alert('ddl');
//$(this).css({position: 'relative', left: -200});
$(this).css({position: 'relative', marginRight: 120});
$(this).children('.bioinfo').show();
}, function() {
$($(this).data('.bioinfo')).hide();
});
떠나요?
나는 유혹 할 때 사업부를 이동
$(this).css({position: 'relative', marginRight: 120});
을 사용했다.
질문을 조금 더 명확하게 해 주실 수 있습니까? –