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

첨부 이미지 사이즈 채택완료

2년 전 조회 1,978

수고하십니다.

첨부 이미지를 원본에서 가로를 50% 줄여 주었습니다.

#bo_v_img img {margin-bottom:20px;max-width:50%; margin-top: 20px;}

세로도 50% 줄여 주고 싶어서

max-height:50%; 추가 해주었는데 줄어 들지 않네요.

다른 방법이 있을지 

조언 좀 부탁드립니다.

감사합니다.

#bo_v_img img {margin-bottom:20px;max-width:50%; max-height:50%; margin-top: 20px;}

답변 2개

채택된 답변
+20 포인트
Copy


#bo_v_img img { margin-bottom: 20px; max-width: 50%; max-height: 50%; margin-top: 20px; object-fit: contain; 

object-fit 사용하시는게 좋습니다.

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

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

#bo_v_img img { margin-bottom:20px; margin-top: 20px; }

view.skin.php 문서 하단에

Copy




if (typeof document.querySelectorAll("#bo_v_img img")[0] == "object") {

    for (i of document.querySelectorAll("#bo_v_img img")) {

        i.style.width = i.offsetWidth * 0.5 + "px";

        // i.style.height = i.offsetHeight * 0.5 + "px"; // 상황에 따라

    }

}



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

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

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

로그인
🐛 버그신고