1
div에 입력 요소를 배치하려고합니다. 크기와 위치를 절대적으로 지정해야하는 배경이 있습니다. 그것은 PC에서 잘 작동하지만 완전히 다른 값을 사용하지 않고 iPad에서 바로 얻을 수 없습니다.위치 폭 : iPad에서 절대 입력 태그가 올바르지 않음
<div id="container">
<input class="input-pc" type="text"/>
</div>
<br/>
<div id="container">
<input class="input-ipad" type="text"/>
</div>
CSS는 :
PC성상 아이 패드에
html로에
성상
#container{
background-color: #343434;
position: relative;
width: 200px;
height: 26px;
}
.input-pc {
position: absolute;
left: 2px;
top: 2px;
width: 196px;
height: 20px;
background-color: #E8FB46;
border: none;
}
.input-ipad {
-webkit-appearance: none;
-webkit-border-radius:0;
position: absolute;
left: 2px;
top: 2px;
width: 186px;
height: 17px;
background-color: #E8FB46;
border: none;
}
Here is a fiddle PC 및 iPad에서 작동하는 두 가지 스타일.
2 개의 입력란을 정확하게 두 플랫폼에 포함시킬 수있는 방법이 있습니까?
불행히도 이것은 트릭을하지 않습니다. iPad에서는 노란색 입력란이 div의 오른쪽에 뻗어 있습니다 ... 필자는이 작업을 시도 할 때 패드를 대신 사용하도록 필자를 업데이트했습니다. [업데이트 된 JSFiddle] (http://jsfiddle.net/RichardHoultz/pgn7N/8/) –