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. 我可以使用多個單選按鈕的形式這樣
- 2. 我怎麼可以在此改變CSS樣式表中的
- 3. 爲什麼按鈕樣式改變時,我編程添加?
- 4. 我可以使用純CSS(按鈕)製作此樣式
- 5. 我可以用什麼來追蹤哪個按鈕被按下?
- 6. 如何給CSS樣式單選按鈕
- 7. 爲什麼我的CSS樣式不改變屬性高度?
- 8. CSS樣式選項按鈕?
- 9. CSS:爲什麼在我可以定位它們時使用樣式類?
- 10. 爲什麼以及如何更改我的按鈕樣式,我的其他撰寫按鈕是否正常?
- 11. 是否有可能用css覆蓋單選按鈕樣式?
- 12. 按鈕來改變可變
- 13. Android使用什麼編譯器,我可以改變它嗎?
- 14. 爲什麼當我改變它時,我的CSS樣式不能更新我的控件?
- 15. 我可以在我的動態按鈕上獲取xaml按鈕樣式嗎?
- 16. jQuery的,爲什麼我不能改變的單選按鈕值設置一次
- 17. 爲什麼我的單選按鈕不可點擊?
- 18. 按下後更改按鈕樣式 - CSS
- 19. 爲什麼我的單選按鈕列表不再工作? (使用CSS設計樣式後)
- 20. 單選按鈕樣式
- 21. 爲什麼我不能檢索單選按鈕變量?
- 22. 我會用什麼樣的正則表達式來匹配它?
- 23. 我做錯了什麼,以獲得單選按鈕值?
- 24. 按鈕樣式,css
- 25. CSS按鈕樣式
- 26. 我可以使用什麼模式來存儲單詞組合?
- 27. 任何方式來改變單選按鈕的顏色?
- 28. 我可以使用什麼來顯示/隱藏可點擊的按鈕?
- 29. 貝寶訂閱按鈕修改 - 我打破它 - 怎麼樣?
- 30. ASP.Net MVC:我可以使用FormCollection來確定選中哪個單選按鈕嗎?
請添加您的html/css代碼。 – rekire
使用「vertical-align:top」,然後使用margin。它會工作。 –
我通常使用position:relative; + top:3px; –