아이폰이 세로 모드로 변경되면 JavaScript를 사용하여 div 요소를 숨기는 방법이 있습니까? 당신의 CSS ;-)iPhone 방향 HTML 숨기기
0
A
답변
0
1
@media all and (orientation:portrait){
#divID {
display: none;
}
}
팝 : 내 자신의
var elem = document.getElementById('elemID');
window.onorientationchange = function(){
if(document.body.offsetWidth == 960){ //don't remember the best way to retrieve body width atm
elem.style.display = "none";
}else{
elem.style.display = "block";
}
}
0
당신이 릴 JS "속임수"를 할 수
관련 문제
- 1. iPhone - 방향 찾기 방향 찾기
- 2. iPhone - UIView 방향 변경
- 3. iPhone SDK : 방향 고정하기
- 4. iPhone 방향 UILabel 크기
- 5. iPhone 장치 방향 문제
- 6. iPhone 방향 문제
- 7. iPhone 화면 방향 감지
- 8. iPhone 기울이기 방향
- 9. iPhone 시작 이미지 방향
- 10. HTML 도움말 - 버튼 숨기기
- 11. iPhone 방향 - 상자 두 개
- 12. iPad 및 iPhone 방향 질문
- 13. iPhone 게임 가로 방향 문제
- 14. 잠금 방향 UIWebView on iPhone
- 15. OpenGLES의 iPhone 방향 변경 처리
- 16. cocos2d에서 iPhone 반전 장치 방향
- 17. Iphone + 기본 창 + 방향 문제
- 18. iPad 및 iPhone 방향 질문
- 19. 100 % 높이의 iPhone 주소창을 숨기기
- 20. iphone -지도보기에서 주석보기 숨기기
- 21. iPhone UIWebView의 키보드 숨기기
- 22. 방향 (LTR/RTL) : CSS 방향과 HTML 방향 속성의 차이점은 무엇입니까?
- 23. iPhone MPMoviePlayer 영화 컨트롤 숨기기
- 24. iPhone 효과가 느린 개체를 숨기기
- 25. Iphone 및 오른쪽에서 왼쪽 방향 텍스트
- 26. iPhone SDK의 앱 세로 방향 제거 기능
- 27. iPhone - 단 하나의 viewcontroller에서 가로 방향 허용
- 28. iPhone glES 게임의 볼륨 표시기 방향 설정
- 29. iphone google maps - 위도와 경도를 사용하는 방향
- 30. iPhone -보기 및 가로 방향 추가
하나, [이전 질문] (http://stackoverflow.com/questions/2323281/can-js-jquery-determine-the-orientation-of-the-phone), 빠른 읽을만한 가치가 있습니다. –