[英]How to overwrite settings set on attrs on styled components once extending a style?
[英]Set Style Class for all Aspx Components at Once
我們有一個帶二十個文本框和幾個下拉列表的aspx頁面。
是否可以一次設置所有樣式?
這可以簡單地用
input, select {
... /* your common style here */
}
但要小心,因為select
元素不能完全自定義(取決於瀏覽器/ OS),因此某些屬性將不會以跨瀏覽器的方式應用(例如,您將無法使用IE6更改select的邊框)
您也可以使用屬性選擇器設置某些特定輸入元素的樣式,例如
input[type="text"], select {
... /* this is applied only to input text and select
}
屬性選擇器即使在IE7上也可以使用所有現代瀏覽器
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.