我有一個簡單的<input type="submit" value="Search">
提交按鈕。 在CSS中,我用input[type="submit"]
和input[type="submit"]:hover
對它進行了樣式設置,所以默認情況下會改變它的背景,當它被徘徊時。點擊後有沒有辦法改變它的背景?input [type =「submit」] - 點擊後改變背景
4
A
回答
11
您應該可以使用input[type=submit]:active
,類似於對鏈接的樣式。
注意,這將無法在IE6正常工作(不知道7和8)
+0
哦,我不介意IE6-IE7兼容... 謝謝大家,這很簡單,我忘了它:D – 2010-07-22 18:01:14
4
input[type="submit"]:active {
color: green;
}
+0
謝謝你這麼多元素的樣式! – 2010-07-22 18:15:09
相關問題
- 1. 更改<input type =「submit」>
- 2. <input type =「submit」> button和javascripts .submit()
- 3. INPUT type =「submit」value =「Go」後創建文件
- 4. 爲<input type ='submit'>
- 5. Chrome input [type = submit] zoom bug
- 6. 點擊更改div背景顏色
- 7. <input type =「submit」/>和<input type =「text」/>
- 8. <input type ='button'/>和<input type ='submit'/>之間的區別
- 9. IOS改變按鈕背景點擊
- 10. 按鈕不會改變背景點擊
- 11. 呈現<input type ='submit'>使用InnerHtml
- 12. jQuery改變背景/ css類點擊圖像點擊和其他
- 13. input [type =「submit」]:選擇CSS不起作用
- 14. 點擊jquery更改背景
- 15. UIButton背景更改點擊
- 16. 點擊後背景輕掃?
- 17. jQuery的變化的背景與<INPUT TYPE =「範圍」>
- 18. INPUT TYPE =「電子郵件」集背後
- 19. jQuery選擇div來改變單選按鈕的背景點擊
- 20. 改變點擊
- 21. <input type = submit />在幕後使用javascript
- 22. (button || input)type = submit - jQuery中的$ _POST變量缺少值AJAX
- 23. 點擊按鈕背景更改
- 24. 在點擊javascript更改背景圖片
- 25. IE7 <button>和<input type = button/submit>怪異的造型?
- 26. AJAX和POST的Rails表單<input type = submit>
- 27. 爲什麼用<input type = submit button error out改變字體大小?
- 28. 如何使用jQuery替換input [type = submit]輸入[type = text]?
- 29. 處理$(「form」)。submit或一個<input type =「submit」>點擊事件之間的區別?
- 30. <INPUT TYPE =「文件」>,改變價值
的onclick JavaScript的能力,可以用來設置 – Martin 2010-07-22 15:49:57