2017-09-20 11 views
-1

굿 데이,밑줄을 쓰지 않고 div 및 css에서 div를 클릭 할 수있게하려면 어떻게해야합니까?

현재 div를 클릭 할 수있는 페이지에서 작업하고 있습니다.

이 멀리있어 :

<a href="http://coteax.me/"> 
<div id ="rectangle"> 
    <div id="iconx"></div> 
<p class="rec-text"> Portal for projects</p> 
</div> 
</a> 

그것은 작동하지만 텍스트가 보라색 선으로 밑줄은 (? 하이퍼 텍스트는) 어떻게 그것을 보라색 선이 사라 텍스트 바로 클릭 할 수 있도록해야합니까?

미리 감사드립니다.

답변

0

CSS로 밑줄을 제거 할 수 있습니다. 예제의 CSS 부분을 확인하십시오.

Link에서 :

html로 :

<div class="boxhead"> 
    <h2> 
     <span class="thisPage">Current Page</span> 
     <a href="myLink"><span class="otherPage">Different Page</span></a> 
    </h2> 
</div> 

CSS의 :

.boxhead .otherPage { 
    color: #FFFFFF; 
    text-decoration: none; 
} 
+0

감사 (외부 CSS를 사용)! 나는 그것을 볼 것이다! –

0

HTML

<div id="iconx"> 
... 
</div> 

CSS

#iconx { 
cursor : pointer; 
} 

JQUERY

$('body').find("#iconx").delegate("click", function() { 
location.href="http://coteax.me/" 
}) 
0

그냥 사용 text-decoration: none.

<a href="http://coteax.me/" style="text-decoration: none;"><div id ="rectangle"><div id="iconx"></div><p class="rec-text"> Portal for projects</p></div></a>

또는

a { 
 
    text-decoration: none; 
 
}
<a href="http://coteax.me/"> 
 
    <div id ="rectangle"> 
 
     <div id="iconx"></div> 
 
     <p class="rec-text">Portal for projects</p> 
 
    </div> 
 
</a>