컴

CSS 투명한 호버 효과

· 2017-06-05 (월) 17:19:54 · 3464

CSS 투명한 호버 효과

 

투명한 호버 효과

이 opacity속성은 종종 :hover 마우스 오버시 불투명도를 변경하기 위해 선택기 와 함께 사용됩니다 .

 

북극광
산맥
피요르드
예
img {
    opacity: 0.5;
    filter: alpha(opacity=50); /* For IE8 and earlier */
}

img:hover {
    opacity: 1.0;
    filter: alpha(opacity=100); /* For IE8 and earlier */
}



<!DOCTYPE html>
<html>
<head>
<style>
img {
    opacity: 0.5;
    filter: alpha(opacity=50); /* For IE8 and earlier */
}

img:hover {
    opacity: 1.0;
    filter: alpha(opacity=100); /* For IE8 and earlier */
}
</style>
</head>
<body>

<h1>Image Transparency</h1>
<p>The opacity property is often used together with the :hover selector to change the opacity on mouse-over:</p>
<img src="img_forest.jpg" alt="Forest" width="170" height="100">
<img src="img_mountains.jpg" alt="Mountains" width="170" height="100">
<img src="img_fjords.jpg" alt="Fjords" width="170" height="100">

<p><b>Note:</b> In IE, a !DOCTYPE must be added for the :hover selector to work on other elements than the a element.</p>

</body>
</html>


Image Transparency

The opacity property is often used together with the :hover selector to change the opacity on mouse-over:

Forest Mountains Fjords

Note: In IE, a !DOCTYPE must be added for the :hover selector to work on other elements than the a element.

|
댓글을 작성하시려면 로그인이 필요합니다.

퍼블리셔팁

1,282건

퍼블리싱과 관련된 유용한 정보를 공유하세요. 질문은 상단의 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
CSS 17-07-18 조회 2,451
CSS 17-07-18 조회 2,525
CSS 17-06-13 조회 3,998
CSS 17-06-13 조회 3,352
CSS 17-06-13 조회 2,588
CSS 17-06-08 조회 2,079
CSS 17-06-08 조회 2,509
CSS 17-06-08 조회 1,996
CSS 17-06-06 조회 5,706
CSS 17-06-05 조회 3,657
CSS 17-06-05 조회 3,465
CSS 17-06-05 조회 2,542
HTML 17-06-02 조회 3,516
HTML 17-05-26 조회 3,953
CSS 17-05-05 조회 2,845
CSS 17-05-05 조회 2,332
CSS 17-05-05 조회 2,102
CSS 17-05-04 조회 3,091
CSS 17-05-04 조회 2,988
CSS 17-05-04 조회 3,490
CSS 17-04-10 조회 2,182
CSS 17-04-10 조회 1,867
CSS 17-04-10 조회 2,633
CSS 17-04-05 조회 2,283
CSS 17-04-05 조회 2,559
CSS 17-04-05 조회 2,556
CSS 17-04-04 조회 2,440
CSS 17-04-04 조회 2,608
CSS 17-04-04 조회 2,706
CSS 17-03-13 조회 3,276