我有一個頁面,其中使用了位於HTML表格中的RadiobuttonList。我給出了表格和td的CSS樣式。我也給了一個CSS風格RadioButtonList,但它不採取它的風格RadioButtonList - 它從td。有什麼辦法可以讓RadioButtonList遵循的風格RadioButtonList而不是td?將CSS STYLE設置爲RadioButtonList
2
A
回答
0
在多個瀏覽器中設置單選按鈕,複選框和選擇一致性非常困難。你最好的選擇是嘗試使用這個jQuery插件 - Fancy Checkboxes。
0
通過CSS設置單選按鈕的風格是有限的。它們的外觀因瀏覽器和操作系統而異。除非您想用腳本版本替換它們,否則最好讓它們保持獨立。
1
我假設你談論造型asp:RadioButtonList
。
添加的CssClass您asp:RadioButtonList
並定義它在你的CSS
<asp:RadioButtonList runat="server" CssClass="radiobuttonlist">
<asp:ListItem Text="Item1" Value="1"></asp:ListItem>
<asp:ListItem Text="Item2" Value="2"></asp:ListItem>
<asp:ListItem Text="Item3" Value="3"></asp:ListItem>
</asp:RadioButtonList>
CSS
.radiobuttonlist { }
.radiobuttonlist tr { }
.radiobuttonlist tr td { }
.radiobuttonlist tr td input { }
.radiobuttonlist tr td label { }
相關問題
- 1. 設置RadioButtonList第一個ListItem爲選中
- 2. 爲什麼我不能使用JQuery style()函數設置這個CSS設置?
- 3. C#將css設置爲System.windows.forms.webBrowser
- 4. 將ListItem值設置爲ASPX RadioButtonList中的常量
- 5. jquery css styleswitcher將cookie設置爲css
- 6. 將style的部分分解爲style?
- 7. CSS list-style
- 8. 如何在asp.net中設置RadioButtonList項目
- 9. 從Codebehind中選擇設置Radiobuttonlist
- 10. 在css中將float設置爲中心
- 11. 將css樣式設置爲HTML textarea行
- 12. 在jQuery中將CSS類設置爲href =「/」
- 13. HTML/CSS將div設置爲背景
- 14. CSS - 將圖像設置爲div
- 15. 將焦點CSS屬性設置爲div
- 16. RadioButtonList的預載設置導致的UpdatePanel觸發重新設置爲初始值
- 17. CSS替代style =「display:none」
- 18. CSS替代style =「display:none」
- 19. 將Enabled =「false」設置爲radiobuttonlist,然後無法切換啓用/禁用
- 20. 爲RadioButtonList的項目
- 21. 應用CSS設置爲iFrame
- 22. 爲屬性設置css
- 23. HTML/CSS設置爲歌劇
- 24. css not working but style =「」是
- 25. css class override with style html snippet
- 26. 2「style」inline css img標籤?
- 27. 將百里香分爲<style>< /style>
- 28. 將設計轉換爲css
- 29. 如何將CSS位置屬性設置爲none?
- 30. 如何將CSS網址設置爲絕對位置?
提供一個例子,一些代碼,請。 – Zeta 2012-03-01 19:40:59
您能否指定您正在申請哪些樣式,哪些樣式不適用? – yoozer8 2012-03-01 19:45:29
什麼是RadioButtonList? – 2012-03-01 19:46:03