2026, 새로운 도약을 시작합니다.

최근게시물노출에서 채택완료

10년 전 조회 4,097

최근게시물을 갤러리로 노출했습니다.

근데 이미지위에 반투명을오 제목을 노출시키고 싶은데 이건 어떻게 해야되나요?

좀 알려주세요 ee655b03744c8bacc3a1e3c0a7fe3b74_1436421456_8175.gif 

답변 4개

채택된 답변
+20 포인트

css 는 

.img_set span {

   position: absolute;

   z-index: 999;

   color: #fff;

   background-color: #000;

   opacity: 0.6;

   padding: 5px 0 5px 12px;

   width: 202px;

   height: 30px;

   margin-top: -40px;

} 추가 해주시고 (올려주신 라인의 18라인 이후에 (반영해보니 이상해서 수정함)) 

텍스트 출력을 위해 

<div class="img_set">

    <a href="<?php echo $list[$i]['href'] ?>">

     <?php               

     $thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $imgwidth, $imgheight);                    

     if($thumb['src']) {

     $img_content = '<img class="img_left" src="'.$thumb['src'].'" alt="'.$list[$i]['subject'].'" width="'.$imgwidth.'" height="'.$imgheight.'">';

     } else {

     $img_content = 'NO IMAGE';

     }               

     echo $img_content; 

     echo "<span>".$list[$i]['subject]."</span>";

     ?>

    </a>

   </div> 

붉은색 글씨 추가해주세요.

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

정말 감사합니다 알려주신 소스덕분에 해결은 했는데요 혹시 마우스를 가저다대면 제목이 나오게 소스를 바꿀수가 있을까요?

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

이걸 프로그램상에서 뿌려지게 할려면 어떻게 해야되나요?

해당소스는

Copy

#oneshot { position:relative;margin:0 0 0 -5px;}
#oneshot .la_title{position:absolute; left:0; top:0; z-index:100; background:#000; padding:5px; font-size:1em; color:#fff;margin:0 0 0 5px;filter:alpha(opacity=50);opacity:.5;}
#oneshot .img_set{width:px; height:px; background:#fafafa;padding:0;}
#oneshot .subject_set{width:px;  padding:-1px 10px 10px 0px; z-index:1; bottom:0; left:0; }
#oneshot .subject_set .sub_title{color:#333;height:17px;overflow:hidden;padding:3px 0 0 0;font-size:1.2em;font-family:NanumBarunGothic,dotum;}
#oneshot .subject_set .sub_content{color:#8c8a8a;height:30px;overflow:hidden;padding:3px 0 0;font-family:NanumGothic,dotum;}
#oneshot ul {list-style:none;clear:both;margin:0;padding:0;}
#oneshot li{float:left;list-style:none;text-decoration:none;padding:0 0 0 5px}
.subject_set  a:link, a:visited {color:#333;text-decoration:none}
.subject_set  a:hover, a:focus, a:active {color:#e60012;text-decoration:none}/* 폰트불러오기 */
@font-face {font-family:'NanumBarunGothic';src: url('/NanumBarunGothic.eot');}
@font-face {font-family:'NanumGothic';src: url('/NanumGothic.eot');}

 
 
  
     
    

로그인 후 평가할 수 있습니다

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

8b3fc377277c46733dbb72416b585980_1436422561_5564.png

보이는건 대략 이렇게 보일거예요
 

로그인 후 평가할 수 있습니다

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

해당 홈페이지 가서 개발자도구로 대충 해봤는데..

이렇게 하면 되지 않을까 싶네요

ex)

Copy
									                  엘레강스한 아이템                   			 
로그인 후 평가할 수 있습니다

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

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고