1 回答
TA贡献2011条经验 获得超2个赞
你可以像这样画你的圆圈:
<div class="circle">
<div id="blue" class="quarter" onclick="quarterClicked()"></div>
<div id="green" class="quarter" onclick="q2()"></div>
<div id="red" class="quarter" onclick="q3()"></div>
<div id="black" class="quarter" onclick="q4()"></div>
</div>
CSS:
.circle {
display: block;
padding: 0;
width: 200px;
height: 200px;
border: 1px;
border-radius: 50%;
overflow: hidden;
}
.quarter {
display: inline-block;
float: left;
margin: 0;
padding: 0;
width: 100px;
height: 100px;
}
#blue {
background-color: blue;
}
#green {
background-color: green;
}
#red {
background-color: red;
}
#black {
background-color: black;
}
JavaScript:
quarterClicked(){
//your code
}
- 1 回答
- 0 关注
- 62 浏览
添加回答
举报