代码如下:
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="js/jquery-1.8.3.min.js"></script>
<style>
.zh-circle{
position: relative;
width: 240px;
height: 240px;
border-radius: 50%;
border: 1px solid #f00;
box-sizing: border-box;
margin: 100px auto 0;
}
.zh-circle li{
position: absolute;
z-index: 2;left: 50%;
top: 30px;
width: 40px;
height: 40px;
margin: -20px 0 0 -20px;
border: 1px solid #f00;
border-radius: 50%;
box-sizing: border-box;
list-style: none;
transform-origin: 20px 110px;
}
</style>
</head>
<body>
<ul class="zh-circle">
<!-- <li></li> -->
</ul>
<script>
window.onload = function(){
var liSize = 6,
li = '';
for(var i=0; i<liSize; i++) {
li += '<li style="transform: rotate('+360/liSize*i+'deg)"></li>';
}
$('.zh-circle').html(li);
}
</script>
</body>
</html>