本篇文章帶給大家的內容是關於如何利用純CSS改變html? radio/checkbox預設背景顏色樣式,有一定的參考價值,有需要的朋友可以參考一下,希望對你有幫助。
CSS程式碼:
input[type=checkbox] { margin-right: 5px; cursor: pointer; font-size: 14px; width: 15px; height: 12px; position: relative; } input[type=checkbox]:after { position: absolute; width: 10px; height: 15px; top: 0; content: " "; background-color: #ff0000; color: #fff; display: inline-block; visibility: visible; padding: 0px 3px; border-radius: 3px; } input[type=checkbox]:checked:after { content: "✓"; font-size: 12px; } input[type=radio] { margin-right: 5px; cursor: pointer; font-size: 14px; width: 15px; height: 12px; position: relative; } input[type=radio]:after { position: absolute; width: 10px; height: 15px; top: 0; content: " "; background-color: #ff0000; color: #fff; display: inline-block; visibility: visible; padding: 0px 3px; border-radius: 50%; } input[type=radio]:checked:before { content: "✓"; display: block; position: relative; top: -2px; left: 3px; width: 6px; height: 6px; color: #fff; font-weight: 400; z-index: 1; }
HTML 範例:
<input type="checkbox" name="method" value="plus" checked>plus<br> <input type="checkbox" name="method" value="minus">minus<br> <input type="radio" name="method" value="plus">plus<br> <input type="radio" name="method" value="minus" checked>minus<br>
以上就是對如何利用純CSS改變html? radio/checkbox預設背景顏色樣式的完整介紹,如果您想了解更多有關CSS3影片教學,請關注PHP中文網。
以上是如何利用純CSS改變html? radio/checkbox預設背景顏色樣式的詳細內容。更多資訊請關注PHP中文網其他相關文章!
陳述
本文轉載於:qdfuns。如有侵權,請聯絡admin@php.cn刪除

前幾天我得到了這個問題。我的第一個想法是:奇怪的問題!特異性是關於選擇者的,而在符號不是選擇器,那麼...無關緊要?

在這篇文章中,我們將使用我構建和部署的電子商務商店演示來進行Netlify,以展示如何為傳入數據製作動態路線。這是一個公平的


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章
R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
1 個月前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳圖形設置
1 個月前By尊渡假赌尊渡假赌尊渡假赌
刺客信條陰影:貝殼謎語解決方案
3 週前ByDDD
Windows 11 KB5054979中的新功能以及如何解決更新問題
2 週前ByDDD
威爾R.E.P.O.有交叉遊戲嗎?
1 個月前By尊渡假赌尊渡假赌尊渡假赌

熱工具

Dreamweaver Mac版
視覺化網頁開發工具

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具

MantisBT
Mantis是一個易於部署的基於Web的缺陷追蹤工具,用於幫助產品缺陷追蹤。它需要PHP、MySQL和一個Web伺服器。請查看我們的演示和託管服務。

SAP NetWeaver Server Adapter for Eclipse
將Eclipse與SAP NetWeaver應用伺服器整合。

WebStorm Mac版
好用的JavaScript開發工具