如何在ASP.NET中使用Asp:RadioButton控件給出單選按鈕和文本之間的間距?在ASP中給文本和廣播之間的間距
<asp:RadioButton ID="radio1" runat="server" GroupName="Group1" />
如何在ASP.NET中使用Asp:RadioButton控件給出單選按鈕和文本之間的間距?在ASP中給文本和廣播之間的間距
<asp:RadioButton ID="radio1" runat="server" GroupName="Group1" />
嘗試:
<asp:RadioButton ID="radio1" CssClass="Space" runat="server" GroupName="Group1" />
和CSS:
.Space label
{
margin-left: 20px;
}
在這裏工作......
哪裏是你的文字嗎?爲單選按鈕使用標籤或在按鈕周圍的CSS中添加一些邊距。
使用CSS:
input[type="radio"]
{
margin-right: 2px;
}
或者:
input[type="radio"] + label
{
margin-left: 2px;
}
這一個工程! – Flea 2014-06-17 16:14:46
的作品是與之前的& NBSP的單選按鈕的文本屬性的另一種方法;符號像這樣Text =「& nbsp;我有墊在我面前」
Asp.Net已經爲'RadioButton'創建一個'label' html標記 – 2010-08-20 10:20:36
好像在使用MVC的時間太長了:)無論如何,答案是css: ) – Stefanvds 2010-08-20 10:41:09