<a>
을 클릭하면 div 크기를 조정하는 간단한 자바 스크립트입니다. 내 아이폰에서 작동하지 않는 것 같습니다. 간단한 링크JavaScript - touchstart가 iPhone에서 작동하지 않습니다.
시작 :
전체 화면 표시 내용에 사업부를 확장<a href="#" onfocus="menu()">MENU</a>
.
<script>
var headerHeight = document.getElementById("header_container").clientHeight;
function menu() {
document.getElementById("nav_container").style = "display:block;";
document.getElementById("header_container").style = "height:100%";
document.getElementById("header").style = "height:100%";
}
function revert(){
document.getElementById("nav_container").style = "display:none;";
document.getElementById("header_container").style = "height:"+headerHeight+";";
document.getElementById("header").style = "height:"+headerHeight+";";
}
</script>
작품 완벽하게 바탕 화면에, 파이어 폭스 개발자 에드을 사용하여 : 그 DIV,
<a href="#" onfocus="revert()">close</a>
그리고 JS 내부. 반응 형 디자인 모드에서는 Simulate touch events
이 활성화됩니다. 나는 버튼을 누르면
:-(내 모바일 장치에서 작동하는 것 아무것도. 어떤 아이디어를 발생하지 않는다?
a) 더 나은 의미는 '