三个圆形按键点击颜色发生改变

来源:互联网 发布:intel mpi windows 编辑:程序博客网 时间:2024/04/29 21:39

需要设置3个类来实现点击颜色的切换

<html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title></head><style>label#lbl-1 {  background: #6756ea;  width: 20px;  height: 20px;  display: block;  float: right;  border-radius: 50%;  margin: 16px 10px 0px 0px;}label#lbl-2 {  background: #ea569a;   width: 20px;  height: 20px;  display: block;  float: right;  border-radius: 50%;   margin: 16px 10px 0px 0px;}label#lbl-3 {  background: #f1c85f;  width: 20px;  height: 20px;  display: block;  float: right;  border-radius: 50%;  margin: 16px 10px 0px 0px;}</style><body><div class="head-info"><label id="lbl-1" onclick="this.id='lbl-2'" onmouseout="this.id='lbl-1'"> </label> <label id="lbl-2" onclick="bb()"> </label><label id="lbl-3" onclick="cc()" > </label></div></body></html>


0 0
原创粉丝点击