|
|

楼主 |
发表于 2022-11-12 15:05
|
显示全部楼层
代码
- <style>
- #papa {
- margin: 50px auto 0;
- width: 100%px;
- height: 640px;
- display: grid;
- place-items: center;
- position: relative;
- }
- #papa > span {
- position: absolute;
- font: bold 3em serif;
- }
- </style>
- <div id="papa"></div>
- <script>
- //星座图案 9800~9811
- let total = 12, rr = 150;
- Array.from({length: total}).forEach((item,key) => {
- item = document.createElement('span');
- item.innerText = String.fromCharCode(9800+key);
- item.style.transform = `rotate(${360 / total * key}deg) translateY(${rr}px) rotate(-${360 / total * key}deg`;
- papa.appendChild(item);
- });
- </script>
复制代码
|
|