Warning: Undefined array key "mobile_dir" in /home/kagla/new-sir/old/common.php on line 315
리스트 썸네일 이미지 사이즈를 따로 잡고 싶습니다.

리스트 썸네일 이미지 사이즈를 따로 잡고 싶습니다.

리스트 썸네일 이미지 사이즈를 따로 잡고 싶습니다.

QA

리스트 썸네일 이미지 사이즈를 따로 잡고 싶습니다.

답변 1

본문

이미지 두개를 따로 뽑고있는데,

 

echo $img_content; 이미지는 100x100

 

echo $img_content2; 이미지는 300x300 으로 뽑고 싶습니다.

 

그리고 관리자 이미지 폭사이즈는 100x100 으로 적용했는데

 

echo $img_content2; 이미지에서 스타일을 적용했더니 이미지 사이즈 100에서 300으로 늘려지면서

이미지가 깨집니다 ㅠ

 

echo $img_content2; 이미지사이즈를 따로 지정할수있는 방법 알려주시면 감사하겠습니다.

 

 

 

 

   <?php
   if ($list[$i]['is_notice']) { // 공지사항  ?>
    <strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>
   <?php } else {
    $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
    $thumb2 = get_list_thumbnail2($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);

    if($thumb['src']) {
     $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
    } else {
     $img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
    }

    if($thumb2['src']) {
     $img_content2 = '<img src="'.$thumb2['src'].'" alt="'.$thumb2['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
    } else {
     $img_content2 = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
    }

    echo $img_content2;
   }
    ?>

이 질문에 댓글 쓰기 :

답변 1


<?php
   if ($list[$i]['is_notice']) { // 공지사항  ?>
    <strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>
   <?php } else {
    $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
    $thumb2 = get_list_thumbnail2($board['bo_table'], $list[$i]['wr_id'], 300, 300);
    if($thumb['src']) {
     $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
    } else {
     $img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
    }
    if($thumb2['src']) {
     $img_content2 = '<img src="'.$thumb2['src'].'" alt="'.$thumb2['alt'].'" width="300" height="300">';
    } else {
     $img_content2 = '<span style="width:300px;height:300px">no image</span>';
    }
    echo $img_content2;
   }
    ?>
답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 129,406
© SIRSOFT
현재 페이지 제일 처음으로