WEB 표준(HTML,CSS)
[CSS] Div hover 효과 주기
비니미니파파
2015. 2. 13. 11:43
<style>
.news_text {
background:#cdcdcd;
opacity: 0.5;
}
.news_text:hover {
opacity: 1.0;
}
</style>
<div class=".news_text">
오늘의 뉴스는....
</div>
div 에 투명도가 있음.
마우스 hover 되었을 때 text 가독성을 높이려고 투명도를 없애는
효과가 필요해서 해봄.... 잘됨.....
opacity 유효값이 궁금하여 검색 해봄...
http://www.w3schools.com/cssref/css3_pr_opacity.asp
Specifies the opacity. From 0.0 (fully transparent) to 1.0 (fully opaque)
0.0~1.0 까지 값을 사용.... 끝....