div를 투명~하게!

tn.png
div 를 투명하게 해볼까요?
필터를 쓰시면 됩니다.
 filter:alpha(opacity=30);
하지만 단점이 있습니다.

div 안에 들어간, 이미지, 글자 등이 모두 투명하게 됩니다.

따라서 올려놓은 이미지를 img폴더에 놓고 이렇게 설정하세요.

#toomyung {width:500px; height:500px; background-image: url(img/tn.png);}

첨부파일

tn.png (154 bytes)
1회 2009-10-24 21:03
|

댓글 4개

감사합니다~ ^^
파일을 분명히 올려놨는데 다운받는곳에 없네요 ㅡㅡ;;

포토샵에서 ctrl N 누르셔서 투명 하고 나서 흰색으로 채워넣기 한 다음 투명도를 조절하세요
/* for IE */
filter:alpha(opacity=60);
/* CSS3 standard */
opacity:0.6;

브라우져마다 다르게 적용되어야 하네요

http://www.w3schools.com/css/css_image_transparency.asp
<style type="text/css">
body {background-image:url(img/bg.png); text-align:center;}
#wrap {width:900px; height:500px; text-align:left; margin:0 auto; filter:alpha(opacity=30); background-color:#fff;}
</style>
<div id="wrap">
<span style="font-size:25pt; font-weight:bold;">안녕하세요.</span>
</div>

+

#wrap span { filter:alpha(opacity=100);position:relative; }

IE7에서 확인했습니다.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
16년 전 조회 6,443
16년 전 조회 3,009
16년 전 조회 7,126
16년 전 조회 3,512
16년 전 조회 3,091
16년 전 조회 4,782
16년 전 조회 6,028
16년 전 조회 5,016
16년 전 조회 3,604
16년 전 조회 7,781
16년 전 조회 3,697
16년 전 조회 3,873
16년 전 조회 3,545
16년 전 조회 3,813
16년 전 조회 3,704
16년 전 조회 4,793
16년 전 조회 2,949
16년 전 조회 1.2만
16년 전 조회 2,914
16년 전 조회 6,212
🐛 버그신고