페이지 데스크탑 및 모바일 수정 했는데 모바일버전이 이상해요... 채택완료
파랑이 데스크탑 index.php 파일
주황이 mobile index.php 파일 입니다.
맨 밑에 부분 말고는 다 똑같이 입력 했어요.
그리고 이미지도 각 폴더에 똑같이 넣었구요.
CSS 파일도 모바일과 디폴트 파일 내부에 똑같이 작성 했습니다.
CSS는 모바일 이미지 경로만 img/mobile/ 이처럼 모바일만 추가 했는데
데스크탑에서는 이미지가 정상적으로 나오는데 모바일에서는 이미지가 안나오는데 왜 이런거죠...
핸드폰에서 morrie27.cafe24.com 들어가시면 회색 바탕에 글씨만 나오고 있어요...
데스크탑에선 배경도 나오는데... 왜 이런거죠...
if (G5_IS_MOBILE) { include_once(G5_THEME_MOBILE_PATH.'/index.php'); return; }
include_once(G5_THEME_PATH.'/head.php'); ?>
include_once(G5_THEME_MOBILE_PATH.'/head.php'); ?>
모바일 CSS 파일 입력한거예요.
html, body{ margin:0; padding: 0; }
h1, p{ margin:0; }
a{ color: inherit; text-decoration: none; }
#main{ background: url(http://morrie27.cafe24.com/theme/kluge/img/mobile/texture.jpg">http://morrie27.cafe24.com/theme/kluge/img/mobile/texture.jpg) no-repeat; background-size: cover; background-position: center center; width: 100vw; height: 100vh; font-family: 'Questrial', sans-serif; }
#contents{ position: absolute; top: 50%; transform: translateY(-50%); width:100%; color: white; text-align: center; }
#contents h1{ font-family: 'Dancing Script', cursive; font-size: 70px; margin-bottom: 16px; }
#contents p{ font-size: 23px; margin-bottom: 16px; }
#contents a{ display: inline-block; border:2px solid white; border-radius: 20px; padding:10px 20px; font-size: 17px; font-weight: bold; transition: all 0.5s; }
#contents a:hover{ background-color: red; }
@media(max-width:769px){ #contents h1{ font-size: 50px; }
#contents p{ font-size: 20px; }
#contents a{ font-size: 14px; } }
#main-1{ background: url(http://morrie27.cafe24.com/theme/kluge/img/mobile/texture-1.jpg">http://morrie27.cafe24.com/theme/kluge/img/mobile/texture-1.jpg) no-repeat; background-size: cover; background-position: center center; width: 100%; height: 100vh; font-family: 'Questrial', sans-serif; }
#main-2{ background: url(http://morrie27.cafe24.com/theme/kluge/img/mobile/texture-2.jpg">http://morrie27.cafe24.com/theme/kluge/img/mobile/texture-2.jpg) no-repeat; background-size: cover; background-position: center center; width: 100%; height: 100vh; font-family: 'Questrial', sans-serif; }
#main-3{ background: url(http://morrie27.cafe24.com/theme/kluge/img/mobile/texture-3.jpg">http://morrie27.cafe24.com/theme/kluge/img/mobile/texture-3.jpg) no-repeat; background-size: cover; background-position: center center; width: 100%; height: 100vh; font-family: 'Questrial', sans-serif; }
#main-4{ background: url(http://morrie27.cafe24.com/theme/kluge/img/mobile/texture-4.jpg">http://morrie27.cafe24.com/theme/kluge/img/mobile/texture-4.jpg) no-repeat; background-size: cover; background-position: center center; width: 100%; height: 100vh; font-family: 'Questrial', sans-serif; }
답변 3개
제 폰에선 모바일도 PC처럼 잘 나옵니다.
모바일 브라우저 설정에서 캐시 삭제하고 새로고침해보세요.
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
http://troy.labs.daum.net/">http://troy.labs.daum.net/
위 사이트에서 테스트 시도 결과, 정상적으로 나옵니다.
작은별 님 말씀처럼 모바일 브라우저의 캐시를 삭제한 뒤, 다시 시도하여 보세요.
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인