pc 모바일 다르게 채택완료
은빛여전사
6년 전
조회 3,963

위 이미지는 게시판 내용글입니다.
현재 위 이미지 처럼 나오고 있습니다.
PC에서는 위의 작은 이미지로 가로 2줄로 나오고
모바일에서는 아래 이미지처럼 1줄로 꽉찬 이미지로 나오게 하려고 하는데요
</p>
<p><?php if(!is_mobile()){ ?></p>
<p><div style="width: 49%; float: left;">
<img title="95ce92a3b3dc9c0ecce51808c730a923_1544321050_8231.JPG" src="<a href="<a href="http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321050_8231.JPG" target="_blank" rel="noopener noreferrer">http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321050_8231.JPG</a>"><a href="http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321050_8231.JPG" target="_blank" rel="noopener noreferrer">http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321050_8231.JPG</a></a>">
</div>
<div style="width: 2%; float: left;">
<span style="color: rgb(255, 255, 255);">0</span>
</div>
<div style="width: 49%; float: left;">
<img title="95ce92a3b3dc9c0ecce51808c730a923_1544321049_5621.JPG" src="<a href="<a href="http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321049_5621.JPG" target="_blank" rel="noopener noreferrer">http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321049_5621.JPG</a>"><a href="http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321049_5621.JPG" target="_blank" rel="noopener noreferrer">http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321049_5621.JPG</a></a>">
</div></p>
<p><?php } ?></p>
<p><?php if(is_mobile()){ ?></p>
<p><div style="width: 100%; float: left;">
<img title="95ce92a3b3dc9c0ecce51808c730a923_1544321050_8231.JPG" src="<a href="<a href="http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321050_8231.JPG" target="_blank" rel="noopener noreferrer">http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321050_8231.JPG</a>"><a href="http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321050_8231.JPG" target="_blank" rel="noopener noreferrer">http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321050_8231.JPG</a></a>">
</div></p>
<p> <div style="width: 100%; float: left;">
<img title="95ce92a3b3dc9c0ecce51808c730a923_1544321049_5621.JPG" src="<a href="<a href="http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321049_5621.JPG" target="_blank" rel="noopener noreferrer">http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321049_5621.JPG</a>"><a href="http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321049_5621.JPG" target="_blank" rel="noopener noreferrer">http://policets.co.kr/data/editor/1812/95ce92a3b3dc9c0ecce51808c730a923_1544321049_5621.JPG</a></a>">
</div></p>
<p><?php } ?></p>
<p> </p>
<p>이렇게 햇는데.. 위 처럼 나오네요 ㅠㅠㅠ</p>
<p>게시판 에서는 위 소스로 적용이 안되는거 같은데</p>
<p> </p>
<p>게시판에서 PC 화면과 모바일 화면을 다르게 하려면 어떻게 해야 하나요??</p>
<p> </p>
<p>
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
6년 전
글쓰기에서 php코드를 넣을수 없습니다
</p>
<p><style>
.media_one {font-size: 0}
.media_one img {width: 50%}
@media screen and (max-width:768px){
.media_one img {width: 100%}
}
</style>
<div class="media_one">
<img src="" alt="">
<img src="" alt="">
</div></p>
<p>
위와같은 방법을 이용하세요
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인