这是我在chrome设备模式下使用的代码,选择选项列表溢出设备宽度,我不知道它是在真实设备中出现的,我还在这里附上了我的截图

<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Form control: select</h2>
<p>The form below contains two dropdown menus (select lists):</p>
<form role="form">
<div class="form-group">
<label for="sel1">Select list (select one):</label>
<select class="form-control" id="sel1">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<br>
</div>
</form>
</div>
</body>
</html>
发布于 2016-08-09 18:15:39
不,这将显示在您的设备中。选项列表项溢出这是因为操作系统(window)。如果您在其他浏览器中进行测试。它将使用默认属性执行diffident (意味着如果您不使用css或js进行自定义)。
如果你在安卓上看到这个,那就没问题了,在iPhone上,它会和iphone的默认选项框一起显示。

发布于 2016-08-09 18:07:17
你实际上没有问任何类型的问题,只是陈述了Chrome做什么的事实……我不确定这是否适合这个网站,但不管怎样:
你的代码没有问题,这就是设计模式的行为方式,以便显示下拉菜单中的完整长度的选项。
在真实设备上,这将在iOS中原生显示,或显示为视口宽度。
https://stackoverflow.com/questions/38847644
复制相似问题