You can simply use the usual way of inserting line breaks in text. For tags , the default <select>style white-spaceis changed to nowrap, so all you have to do is change it to normal:
* {
box-sizing: border-box;
}
#data {
overflow:hidden;
padding:0;
width:100vw;
}
select {
padding:0;
padding-left:1px;
border:none;
background-color:#eee;
width:100vw;
white-space: normal;
height:200px;
}
option {
height:100px;
width:100px;
border:1px solid #000;
background-color:white;
margin-left:-1px;
display:inline-block;
}
<form>
<div id="data">
<select multiple size="1">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
</select>
</div>
</form>
Run code