Skip to content

Instantly share code, notes, and snippets.

@ituki
Last active August 29, 2015 14:03
Show Gist options
  • Save ituki/8eb566c22300479b4ecd to your computer and use it in GitHub Desktop.
Save ituki/8eb566c22300479b4ecd to your computer and use it in GitHub Desktop.
スマホでselectのテキストは左右中央にできるのか ref: http://qiita.com/ituki_b/items/57e96284361321d8e769
<label>
<select>
<option>選択1だよ〜</option>
<option>選択2だよ〜</option>
<option>選択3だよ〜</option>
</select>
</label>
select { //Android
text-align: center;
}
@media screen and (max-device-width: 480px) { //iPhone
label {
display: -webkit-box;
display: box;
box-pack:center;
-webkit-box-pack:center;
background-color: #fff;
border: 1px solid #CCC;
border-radius: 6px;
cursor: pointer;
}
select {
border: none;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment