Last active
August 29, 2015 14:03
-
-
Save ituki/8eb566c22300479b4ecd to your computer and use it in GitHub Desktop.
スマホでselectのテキストは左右中央にできるのか ref: http://qiita.com/ituki_b/items/57e96284361321d8e769
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label> | |
<select> | |
<option>選択1だよ〜</option> | |
<option>選択2だよ〜</option> | |
<option>選択3だよ〜</option> | |
</select> | |
</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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