本文摘自PHP中文网,作者V,侵删。

我们先来看下效果图:

(学习视频分享:html视频教程)
html代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | < html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< title >开关图标</ title >
</ head >
< body >
< div >
< div >
< input type = "checkbox" id = "toggle-button" name = "switch" ο nclick = "SwitchClick()" checked>
< label for = "toggle-button" >
< span ></ span >
< span class = "text on" >ON</ span >
< span class = "text off" >OFF</ span >
</ label >
</ div >
</ div >
</ body >
</ html >
|
css样式:
阅读剩余部分
相关阅读 >>
Html怎样格式化json数据
Html怎么设置只读
Html5 meter标签什么意思?meter标签的用法详解
前端开发紧密相关的http协议知识
Html如何设置尺寸大小
Html如何设置必填项
怎样做好语义化和优化Html
Html的<basefont> 标签
Html可输入下拉菜单应该如何编写
Html th有什么用
更多相关阅读请进入《Html》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » 利用前端基础制作html开关图标