2014-10-29 3 views
0

나는 안드로이드 앱이 있는데 어디서 webView를로드 할 수 있습니까? webview에서 체크 박스가 있지만 크기를 변경할 수 없습니다.변경 체크 박스 webview android

input[type="checkbox"] 
{ 
    width: 25px; 
    height: 25px; 
} 

화면 http://postimg.org/image/l9lg35czj/

크기 변경 (I 브라우저의 체크 박스의 크기가이 페이지를 보면 변경) 크기가 웹보기에 변경되지 왜

input[type="checkbox"] 
    { 
     width: 250px; 
     height: 250px; 
    } 

http://postimg.org/image/v96ow0otv/

?

전체 코드는

<html> 
<head> 
<style> 
    .single_user 
    { 
     width:100%; 
     height:120px; 
     border: black; 
     background:#E5E5E5; 
     margin-bottom: 10px; 
    } 
    .user_image 
    { 
     padding-left: 10px; 
     padding-top: 10px; 
    } 
    h1 
    { 
     display: inline-block; 
    } 
    input[type="checkbox"] 
    { 
     width: 25px; 
     height: 25px; 
    } 
</style> 
<meta name="viewport" content="width=device-width, target-densitydpi=device-dpi, user-scalable=no"/> 
</head> 

<body> 
<div class="single_user"> 
<img class="user_image" src="statimg/profileicon.png"/> 
<h1> Vahagn Vard2anyan <br /> 
[email protected]</h1> 
<input type="checkbox" style="width: 100%; height:100%;"/> 
</div> 
<div class="single_user"> 
</div> 
</body> 
</html> 
+0

을 클릭 할 수 있습니다. 여기에 전체 코드를 게시 할 수 있습니까? 또한 Android 및 Android 버전에 따라 다릅니다. android os가 설치된 앱을 어느 기기에서 폐기 했습니까? –

답변

1

나도이 문제에 직면. html의 체크 박스는 처음에는 너비/높이 CSS 속성에 따라 크기가 변경되지 않습니다 (그러나 일부 브라우저에서는이 기능을 지원합니다). 크기를 변경하려면 transform: scale(scaleX, scaleY); (this answer 참조)을 사용하거나 this과 같은 사용자 정의 확인란을 구현할 수 있지만 트릭입니다.

UPDATE

체크 박스는 텍스트 범위에 의해 resplaced 쉬운 일이 나에게보고 적절한입니다 이벤트 핸들러에게

<!DOCTYPE html> 
<html> 
<head lang="en"> 
    <meta charset="UTF-8"> 
    <title></title> 
    <style> 
     #checkbox { 
      width: 30px; 
      height: 30px; 
      background: red; 
     } 
     #checkmark { 
      width: 100%; 
      height: 100%; 
      font-size:30px; 
      position: absolute; 
     } 
    </style> 
    <script type="text/javascript"> 
    function setCheckboxChecked(checkbox) { 
     checkbox.checked = !checkbox.checked; 
     var checkmark = checkbox.querySelector('#checkmark'); 
     if(checkbox.checked) { 
      checkmark.innerHTML = '\u2713'; 
     } else { 
      checkmark.innerHTML = ''; 
     } 
    } 
</script> 
</head> 
<body> 
<div id="checkbox" onclick="javascript:setCheckboxChecked(this);"> 
    <span id="checkmark"></span> 
</div> 
</body> 
</html> 
+0

미안하지만 도움이되지 않습니다 –

+0

http://109.120.161.43/tmp.php 웹 변경되었지만 웹보기가 –

+0

이 아니므로 업데이트 내 대답을 참조하십시오 –