我将这些输入框的边框宽度设置为1px。但是,出于某种原因,在ios上,顶部边框看起来比它应该更大(无论浏览器如何)。
在任何其他类型的设备上,边框看起来很好。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,minimum-scale=1">
<title>ios rendering test</title>
</head>
<body>
<style media="screen">
input {
border: 1px solid #ccc;
height: 100px;
margin: 5%;
}
</style>
<form class="" action="index.html" method="post">
<input type="text" name="" value="firstname">
<input type="text" name="" value="lastname">
<input type="text" name="" value="email">
<input type="submit" name="submit" value="subscribe">
</form>
</body>
</html>
答案 0 :(得分:0)
由于 iOS input
被定位,您需要使用-webkit-appearance: none;
input {
-webkit-appearance: none; /* Add this */
border: 1px solid #ccc;
height: 100px;
margin: 5%;
}
Here is an article,其中包含有关appearance
代码的更多信息。