| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- <style>
- *{
- margin: 0;
- padding: 0;
- }
- li{
- list-style: none;
- }
- .box{
- width: 404px;
- height: 404px;
- border: 2px dashed black;
- position: fixed;
- top: 50%;
- left: 50%;
- transform: translate(-50%,-50%);
- }
- .clock{
- width: 400px;
- height: 400px;
- border: 2px solid black;
- border-radius: 50%;
- position: relative;
- }
- .clock li{
- width: 2px;
- height: 6px;
- background-color: black;
- position: absolute;
- top: 0;
- left: 50%;
- /* transform: translateX(-50%); */
- margin-left: -1px;
- transform-origin: center 200px;
- }
- /* .clock li:nth-child(1){
- transform: rotate(6deg) translateX(-50%);
- }
- .clock li:nth-child(2){
- transform: rotate(12deg) translateX(-50%);;
- } */
- .clock li:nth-child(5n+1){
- height: 12px;
- }
- </style>
- </head>
- <body>
- <div class="box">
- <div class="clock">
- <ul>
- <!-- <li></li>
- <li></li>
- <li></li> -->
- </ul>
- </div>
- </div>
- <script>
- var oUl = document.getElementsByTagName("ul")[0];
- var str = ""
- for(var i=0;i<60;i++){
- str += "<li style='transform: rotate("+(i*6)+"deg);'></li>"
- }
- oUl.innerHTML = str;
- </script>
- </body>
- </html>
|