美化<input type="range">控制元件程式碼例項
本章節分享一段程式碼例項,它實現了美化<input type="range">控制元件的功能。
程式碼例項如下:
[HTML] 純文字檢視 複製程式碼<!DOCTYPE html> <html> <head> <meta charset="gb2312"> <title>螞蟻部落</title> <style> input[type=range] { -webkit-appearance: none; margin: 18px 0; width: 100%; } input[type=range]:focus { outline: none; } input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 8.4px; cursor: pointer; box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; background: #3071a9; border-radius: 1.3px; border: 0.2px solid #010101; } input[type=range]::-webkit-slider-thumb { box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; border: 1px solid #000000; height: 36px; width: 16px; border-radius: 3px; background: #ffffff; cursor: pointer; -webkit-appearance: none; margin-top: -14px; } input[type=range]:focus::-webkit-slider-runnable-track { background: #367ebd; } input[type=range]::-moz-range-track { width: 100%; height: 8.4px; cursor: pointer; box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; background: #3071a9; border-radius: 1.3px; border: 0.2px solid #010101; } input[type=range]::-moz-range-thumb { box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; border: 1px solid #000000; height: 36px; width: 16px; border-radius: 3px; background: #ffffff; cursor: pointer; } input[type=range]::-ms-track { width: 100%; height: 8.4px; cursor: pointer; background: transparent; border-color: transparent; border-width: 16px 0; color: transparent; } input[type=range]::-ms-fill-lower { background: #2a6495; border: 0.2px solid #010101; border-radius: 2.6px; box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; } input[type=range]::-ms-fill-upper { background: #3071a9; border: 0.2px solid #010101; border-radius: 2.6px; box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; } input[type=range]::-ms-thumb { box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; border: 1px solid #000000; height: 36px; width: 16px; border-radius: 3px; background: #ffffff; cursor: pointer; } input[type=range]:focus::-ms-fill-lower { background: #3071a9; } input[type=range]:focus::-ms-fill-upper { background: #367ebd; } </style> </head> <body> <input type="range" style="width:200px;"> </body> </html>
相關文章
- input range美化程式碼例項
- <input type="file">美化例項程式碼
- <input type="file">美化效果程式碼例項
- <input type="range">標籤用法例項程式碼
- js清空<input type="file">值程式碼例項JS
- table表格美化程式碼例項
- input[type=file]使用css美化效果CSS
- type=“file”的input標籤美化
- js通過type屬性值篩選input元素程式碼例項JS
- radio美化程式碼例項
- CSS 美化滑動輸入條 input rangeCSS
- 美化滾動條效果程式碼例項
- 表單提示美化效果程式碼例項
- select下拉選單美化程式碼例項
- angularJS操作input元素程式碼例項AngularJS
- input密碼輸入提示效果程式碼例項密碼
- <input type="file">實現各個瀏覽器樣式統一程式碼例項瀏覽器
- checkbox核取方塊美化程式碼例項
- jQuery美化select下拉選單程式碼例項jQuery
- 去除input焦點描邊程式碼例項
- input文字框圓角效果程式碼例項
- 模擬美化select下拉選單程式碼例項
- 模擬美化checkbox核取方塊程式碼例項
- 讓input文字框文字垂直居中程式碼例項
- HTML input rangeHTML
- css3實現button按鈕美化效果程式碼例項CSSS3
- input文字框實現寬度自適應程式碼例項
- input file利用FileReader實現圖片上傳程式碼例項
- Android Input子系統-含例項原始碼Android原始碼
- css3實現的checkbox核取方塊美化程式碼例項CSSS3
- react input[type='number']React
- input type="file"使用
- jQuery is() 程式碼例項jQuery
- unsupported operand type(s) for +: ‘range‘ and ‘list‘
- input文字框和img圖片能夠垂直居中對齊程式碼例項
- js設定元素控制元件顯示和隱藏程式碼例項JS控制元件
- jQuery選項卡例項程式碼jQuery
- JQuery獲取input type=jQuery