1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
| <!DOCTYPE html> <html lang="en">
<head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <div class="demo"> <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> <li>7</li> <li>8</li> </ul> </div>
<style> .demo { width: 600px; height: 600px; background-color: #000000; padding: 100px; box-sizing: border-box; }
ul, li { margin: 0; list-style-type: none; padding: 0; }
ul { width: 400px; height: 400px; background-color: #fff; border-radius: 50%; position: relative; }
li { width: 40px; height: 40px; position: absolute; background-color: red; border-radius: 50%; line-height: 40px; text-align: center; left: 50%; margin-left: -20px; margin-top: -20px; transform-origin: 20px 220px; }
li:nth-of-type(2) { transform: rotate(45deg); }
li:nth-of-type(3) { transform: rotate(90deg); }
li:nth-of-type(4) { transform: rotate(135deg); }
li:nth-of-type(5) { transform: rotate(180deg); }
li:nth-of-type(6) { transform: rotate(225deg); }
li:nth-of-type(7) { transform: rotate(270deg); }
li:nth-of-type(8) { transform: rotate(315deg);
} </style>
</html>
|