썸네일 사진이 흐릿하게 나옵니다
관련링크
본문
게시글 상세 페이지에는 사진이 제대로 나오는데,
게시글 리스트에 보면 썸네일 사진이 흐릿합니다. 어떤 것을 건드려야하나요?
이것이 썸네일이고
이것이 상세페이지 사진입니다.
이미지 관련 코드들을 적어놓을테니 한 번 살펴봐주시면 감사하겠습니다!
리스트 페이지 코드입니다
<div class="yty">
<?php
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], false, true);
?>
<?php
if ($thumb == true) {?>
<img src='<?php echo $thumb["src"]; ?>' />
<?php } else if ($thumb == false) { echo "이미지없음"; } ?>
</div>
상세페이지 이미지코드입니다.
<div class="thumb">
<div class="photo"><?php if($view['file']['0']['file']){ ?><?php echo get_thumbnail($bo_table, $view['file'][0]['file'], 590, 380, $view['file'][0]['bf_content'], 1); ?><?php } ?></div>
<ul class="minThumb">
<?php for($i = 0; $i <= count($view['file']); $i++) { // 객실 이미지 뷰 ?>
<?php if($view['file'][$i]['file']){
get_thumbnail($bo_table, $view['file'][$i]['file'], 590, 380, $view['file'][$i]['bf_content']);
?>
<li><a href="<?php echo $view['file'][$i]['path'] . '/' . $view['file'][$i]['file']; ?>" target="_blank"><?php echo get_thumbnail($bo_table, $view['file'][$i]['file'], 118, 90, $view['file'][$i]['bf_content'], 1); ?></a></li>
<?php } ?>
<?php } ?>
</ul>
</div>
css 입니다
.mara_view_wrap .subject {margin:0 0 10px 0;font-size:1.5em;}
.mara_view_wrap .thumb {overflow:hidden;height:100%;margin-bottom:15px;}
.mara_view_wrap .thumb .photo {float:left;width:590px;height:380px;margin-right:10px;border:5px solid #999;overflow: hidden;}
.mara_view_wrap .thumb .photo img#target {width:590px;height:380px}
.mara_view_wrap .thumb .minThumb {float:left;width:118px;height:90px;margin:0;padding:0;}
.mara_view_wrap .thumb .minThumb li {margin:0 0 10px 0;padding:0;list-style:none;}
.mara_view_wrap .thumb .minThumb li img {width:118px;height:90px;}
.mara_view_wrap .booking {margin:10px 0;padding:0;text-align:right;}
.mara_view .tit_desc {padding-bottom:10px;font-size:1.25em;font-weight:bold;text-align:left;}
.mara_view thead th {padding:8px 0 7px;border:1px solid #e6e6e6;text-align:center;background:#f5f5f5;}
.mara_view, .tit_desc, .mara_write tbody td{background-color: #fff}
.mara_view tbody th, .mara_view tbody td {padding:8px 0 7px;border:1px solid #e6e6e6;text-align:center;font-weight:normal;line-height:1.8em;}
.mara_view tbody td.left {padding-left:10px;text-align:left;}
.current{margin-left: -10px;margin-top: -10px}
답변 3
이미지 배율이 맞지 않아 그런거같고, 일단 썸네일에서 불러올때 원본이미지를 가져오는거부터 시작하자면
리스트 페이지의 <img src='<?php echo $thumb["ori"] ?>'/>로 바꿔주시면 원본이미지를 가져옵니다. 그리고 style.css에 .yty img {width:330px;height:250px}을주석처리 해주시면 원본이미지를 가져올텐데요.
해당 비율을 그대로 가져가면서 이미지가 안깨지게 해보시려면
<img src='<?php echo $thumb["ori"] ?>'/> 이부분도 다시
<span style="height:250px;display:block;background:url('<?php echo $thumb["ori"]; ?>'); background-position:center;background-size:cover;background-repeat:no-repeat;overflow:hidden"></span>
바까보시기 바랍니다
해당 게시판 설정에서 갤러리 이미지 폭, 갤러리 이미지 높이를 원하는 사이즈로 더 늘리세요.
330 X 250 으로 하시면 되겠네요.
익스플로어8버전이나 9버전인가요?