0
A
回答
0
試試這個:順便說一下
input[type="radio"] {
margin-top: -1px;
vertical-align: middle;
}
你的父母DIV需要有高度設置。
+0
它不是失去了而不是大聲笑 – jazzyy22
0
0
試試這個CSS:
.maxl{
margin:25px ;
}
.inline{
display: inline-block;
}
.inline + .inline{
margin-left:10px;
}
.radio{
color:#999;
font-size:15px;
position:relative;
}
.radio span{
position:relative;
padding-left:20px;
}
.radio span:after{
content:'';
width:15px;
height:15px;
border:3px solid;
position:absolute;
left:0;
top:1px;
border-radius:100%;
-ms-border-radius:100%;
-moz-border-radius:100%;
-webkit-border-radius:100%;
box-sizing:border-box;
-ms-box-sizing:border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
}
.radio input[type="radio"]{
cursor: pointer;
position:absolute;
width:100%;
height:100%;
z-index: 1;
opacity: 0;
filter: alpha(opacity=0);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"
}
.radio input[type="radio"]:checked + span{
color:#0B8;
}
.radio input[type="radio"]:checked + span:before{
content:'';
width:5px;
height:5px;
position:absolute;
background:#0B8;
left:5px;
top:6px;
border-radius:100%;
-ms-border-radius:100%;
-moz-border-radius:100%;
-webkit-border-radius:100%;
}
<div class="maxl">
<label class="radio inline">
<input type="radio" name="sex" value="male" checked>
<span> Male </span>
</label>
<label class="radio inline">
<input type="radio" name="sex" value="female">
<span>Female </span>
</label>
</div>
+0
不錯的格式,但這是恕我直言,總是超出了問題的範圍。 – rekire
0
input{
vertical-align:bottom;
}
<form>
<span>Gender</span>
<label><input type="radio" name="select_gender"/> Male</label>
<label><input type="radio" name="select_gender"/> Female</label>
</form>
希望這有助於。
相關問題
- 1. 當我改變單選按鈕樣式xml - 更改不反映
- 2. 我可以使用多個單選按鈕的形式這樣
- 3. 我怎麼可以在此改變CSS樣式表中的
- 4. 爲什麼按鈕樣式改變時,我編程添加?
- 5. 爲什麼我可以同時選擇兩個單選按鈕?
- 6. JQuery不改變我的單選按鈕
- 7. 我可以使用純CSS(按鈕)製作此樣式
- 8. 單選按鈕撥動開關來改變樣式表
- 9. 單選按鈕的CSS樣式
- 10. jQuery代碼來改變我怎樣才能改變基於單選按鈕選擇可選擇的下拉選項基於單選按鈕選擇
- 11. 我可以用什麼來追蹤哪個按鈕被按下?
- 12. 我可以更改單選按鈕控件的可見性
- 13. 如何給CSS樣式單選按鈕
- 14. 爲什麼我的CSS樣式不改變屬性高度?
- 15. CSS樣式選項按鈕?
- 16. 什麼是切換按鈕以及我們什麼時候可以使用它?
- 17. CSS:爲什麼在我可以定位它們時使用樣式類?
- 18. 爲什麼以及如何更改我的按鈕樣式,我的其他撰寫按鈕是否正常?
- 19. 的onClick()按鈕單選按鈕值不會改變我們JS
- 20. 是否有可能用css覆蓋單選按鈕樣式?
- 21. Android使用什麼編譯器,我可以改變它嗎?
- 22. 按鈕來改變可變
- 23. 單選按鈕啓用/ CSS改變對提交按鈕
- 24. 爲什麼當我改變它時,我的CSS樣式不能更新我的控件?
- 25. 我可以在我的動態按鈕上獲取xaml按鈕樣式嗎?
- 26. 應用CSS來選擇單選按鈕
- 27. jQuery的,爲什麼我不能改變的單選按鈕值設置一次
- 28. 爲什麼我的單選按鈕不可點擊?
- 29. 按下後更改按鈕樣式 - CSS
- 30. 爲什麼我的單選按鈕列表不再工作? (使用CSS設計樣式後)
請添加您的html/css代碼。 – rekire
使用「vertical-align:top」,然後使用margin。它會工作。 –
我通常使用position:relative; + top:3px; –