使用 CSS 修改 HTML 默認單選(radio)和複選框(checkbox)樣式

第一步編寫DOM. input框是原來的默認框。span是我用來代替的框,採用的背景圖模式 第二步編寫樣式。父容器相對定位,span和input相對定位,定位位置相同,但是注意原生的input不要使用display:none屬性,會點擊不到,採用opacity:0的屬性。然後z-index設置比input高點 .videostatusItem{ position: relative;
相關文章
相關標籤/搜索