本文实例为大家分享了js实现开关灯效果的具体代码,供大家参考,具体内容如下
开关灯
body{background: black;cursor: pointer;} .lamp{width: 100px;height: 100px;border-radius: 50%;background: #ccc;} .pole{width: 10px;height: 400px;background: brown;margin-left: 45px;} .toggle{width: 80px;height: 40px;background: green;border-radius: 5px;margin-left: 10px;color: white;line-height: 40px;text-align: center;}
开灯
效果图
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。



