이미지에 제목글 나오게 하려면 어떻게 해야하는지 알려주시면 감사합니다.. 채택완료
수리수리마수미
4년 전
조회 1,791
아래 사진처럼 최신글 이미지에 제목이 나오게 하고 싶습니다..
어떻게 해야하는지 알려주시면 감사합니다..!..

</p>
<p><?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');</p>
<p>$num = 6; // 메인 출력이미지 갯수
?></p>
<p><style type="text/css">
*{ margin:0; padding:0; list-style:none;}
img{ border:0; cursor:pointer;border-radius:0px;}</p>
<p>.imgs{ width:100%; height:367px; border:20px solid #fff; margin:10px auto; position:relative; overflow:hidden;border-radius:20px;}
.imgs:hover li{ background:#ffffff;-webkit-transition:all 0.2s linear;-moz-transition:all 0.2s linear;-ms-transition:all 0.2s linear;-o-transition:all 0.2s linear;transition:all 0.2s linear;}
.imgs:hover img{ opacity:0.4;filter:alpha(opacity=60);-webkit-transition:all 0.2s linear;-moz-transition:all 0.2s linear;-ms-transition:all 0.2s linear;-o-transition:all 0.2s linear;transition:all 0.2s linear;}
.imgs li:hover img{ opacity:1;-webkit-transition:all 0.2s linear;-moz-transition:all 0.2s linear;-ms-transition:all 0.2s linear;-o-transition:all 0.2s linear;transition:all 0.2s linear;}</p>
<p>.imgs0{ width:658px; height:321px; position:absolute; left:0; top:0;}
.imgs1{ width:306px; height:166px; position:absolute; left:0; bottom:0;}
.imgs2{ width:137px; height:166px; position:absolute; left:259px; bottom:0;}
.imgs3{ width:137px; height:166px; position:absolute; left:405px; bottom:0;}
.imgs4{ width:283px; height:157px; position:absolute; right:0; top:0;}
.imgs5{ width:137px; height:166px; position:absolute; right:0; bottom:0;}
</style></p>
<p><div class="imgs">
<?php
for ($i=0; $i<$num; $i++) {
//메인 각 출력이미지 크기
if($i =='0'){ //이미지 출력번호
$img_w = "667"; // 썸네일 생성이미지 가로 크기
$imgs_w = "395"; // 메인 출력 이미지 가로 크기
$imgs_h = "153"; // 메인 출력 이미지 세로 크기
}else if($i =='1'){
$img_w = "333";
$imgs_w = "250";
$imgs_h = "153";
}else if($i =='2'||$i =='3'){
$img_w = "165";
$imgs_w = "137";
$imgs_h = "153";
}else if($i =='4'){
$img_w = "332";
$imgs_w = "283";
$imgs_h = "153";
}else{
$img_w = "332";
$imgs_w = "137";
$imgs_h = "153";
}
$img_h = "";</p>
<p> $thumbs = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $img_w, $img_h);
if($thumbs['src']) {
$imgs = $thumbs['src'];
}?>
<li class="imgs<?=$i?>"><a href="<?php echo $list[$i]['wr_link1'];?>" title="<?=$list[$i]['subject']?>"><img src="<?=$imgs?>" width="<?=$imgs_w?>"
height="<?=$imgs_h?>" /></a></li>
<?}?>
</div></p>
<p>
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
4년 전
</p>
<p><?php</p>
<p>if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가</p>
<p>include_once(G5_LIB_PATH.'/thumbnail.lib.php');</p>
<p>$num = 6; // 메인 출력이미지 갯수</p>
<p>?></p>
<p><style type="text/css"></p>
<p>*{ margin:0; padding:0; list-style:none;}</p>
<p>img{ border:0; cursor:pointer;border-radius:0px;}</p>
<p>.imgs{ width:100%; height:367px; border:20px solid #fff; margin:10px auto; position:relative; overflow:hidden;border-radius:20px;}</p>
<p>.imgs:hover li{ background:#ffffff;-webkit-transition:all 0.2s linear;-moz-transition:all 0.2s linear;-ms-transition:all 0.2s linear;-o-transition:all 0.2s linear;transition:all 0.2s linear;}</p>
<p>.imgs:hover img{ opacity:0.4;filter:alpha(opacity=60);-webkit-transition:all 0.2s linear;-moz-transition:all 0.2s linear;-ms-transition:all 0.2s linear;-o-transition:all 0.2s linear;transition:all 0.2s linear;}</p>
<p>.imgs li:hover img{ opacity:1;-webkit-transition:all 0.2s linear;-moz-transition:all 0.2s linear;-ms-transition:all 0.2s linear;-o-transition:all 0.2s linear;transition:all 0.2s linear;}</p>
<p>.imgs0{ width:658px; height:321px; position:absolute; left:0; top:0;} </p>
<p>.imgs1{ width:306px; height:166px; position:absolute; left:0; bottom:0;} </p>
<p>.imgs2{ width:137px; height:166px; position:absolute; left:259px; bottom:0;} </p>
<p>.imgs3{ width:137px; height:166px; position:absolute; left:405px; bottom:0;} </p>
<p>.imgs4{ width:283px; height:157px; position:absolute; right:0; top:0;}</p>
<p>.imgs5{ width:137px; height:166px; position:absolute; right:0; bottom:0;}</p>
<p>.imgs li > a{</p>
<p> position: relative;</p>
<p>}</p>
<p>.imgs li > a > p{</p>
<p> position: absolute;</p>
<p> z-index: 1;</p>
<p> padding: 10px;</p>
<p> font-size: 1.5rem;</p>
<p> font-weight: bold;</p>
<p> color: #fff;</p>
<p>}</p>
<p></style></p>
<p><div class="imgs"></p>
<p> <?php</p>
<p> for ($i=0; $i<$num; $i++) {</p>
<p> //메인 각 출력이미지 크기</p>
<p> if($i =='0'){ //이미지 출력번호</p>
<p> $img_w = "667"; // 썸네일 생성이미지 가로 크기</p>
<p> $imgs_w = "395"; // 메인 출력 이미지 가로 크기</p>
<p> $imgs_h = "153"; // 메인 출력 이미지 세로 크기</p>
<p> }else if($i =='1'){</p>
<p> $img_w = "333"; </p>
<p> $imgs_w = "250";</p>
<p> $imgs_h = "153"; </p>
<p> }else if($i =='2'||$i =='3'){</p>
<p> $img_w = "165";</p>
<p> $imgs_w = "137";</p>
<p> $imgs_h = "153";</p>
<p> }else if($i =='4'){</p>
<p> $img_w = "332";</p>
<p> $imgs_w = "283";</p>
<p> $imgs_h = "153";</p>
<p> }else{</p>
<p> $img_w = "332";</p>
<p> $imgs_w = "137";</p>
<p> $imgs_h = "153";</p>
<p> }</p>
<p> $img_h = "";</p>
<p> $thumbs = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $img_w, $img_h);</p>
<p> if($thumbs['src']) {</p>
<p> $imgs = $thumbs['src'];</p>
<p> }?></p>
<p> <li class="imgs<?=$i?>"><a href="<?php echo $list[$i]['wr_link1'];?>" title="<?=$list[$i]['subject']?>"><p><?=$list[$i]['subject']?></p><img src="<?=$imgs?>" width="<?=$imgs_w?>" </p>
<p> height="<?=$imgs_h?>" /></a></li></p>
<p> <?php }?></p>
<p></div></p>
<p>
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
�
수리수리마수미
4년 전
감사합니다!!
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인