孤卷残梦饮一池恨 2021-11-26 19:59 采纳率: 80%
浏览 29
已结题

vue或者uniapp如何实现多个div环形布局

问题遇到的现象和发生背景

操作环境、软件版本等信息

尝试过的解决方法

我想要达到的结果

img

  • 写回答

2条回答 默认 最新

  • 关注

    找到一个中心点进行旋转,canvas也可以,比较麻烦。ui切图最简单。跑一下看看,具体的自己设置旋转角度。有更好的建议欢迎随时点评!有帮助别忘了关注点采纳~~蟹蟹

      <div class="circle-box">
                <div class="circle1">
                    <div class="cc"></div>
                </div>
                <div class="circle1 circle2">
                    <div class="cc1"></div>
                </div>
                <div class="circle1 circle3">
                    <div class="cc"></div>
                </div>
                <div class="circle1 circle4">
                    <div class="cc"></div>
                </div>
                <div class="circle1 circle5">
                    <div class="cc"></div>
                </div>
            </div>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
    
        .circle-box {
            width: 100px;
            height: 100px;
            border-radius: 100%;
            border: 1px dashed rgb(67, 113, 206);
            position: relative;
            /* box-sizing: border-box; */
            box-sizing: content-box;
            margin: 50px;
    
        }
    
        .circle1 {
            width: 0px;
            height: 0px;
            border-radius: 100%;
            /* border: 1px dashed rgb(67, 113, 206); */
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            top: 50%;
            transform: translateY(-50%);
            transform: rotate(0deg);
        }
    
        .circle2 {
            transform: rotate(45deg);
        }
    
        .circle3 {
            transform: rotate(90deg);
        }
    
        .circle4 {
            transform: rotate(145deg);
        }
    
        .circle5 {
            transform: rotate(190deg);
        }
    
        .cc {
            margin-top: 45px;
            width: 10px;
            height: 10px;
            border-radius: 100%;
            border: 1px dashed rgb(230, 25, 25);
        }
    </style>
    
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 3月29日
  • 已采纳回答 3月21日
  • 创建了问题 11月26日

悬赏问题

  • ¥20 删除和修改功能无法调用
  • ¥15 kafka topic 所有分副本数修改
  • ¥15 小程序中fit格式等运动数据文件怎样实现可视化?(包含心率信息))
  • ¥15 如何利用mmdetection3d中的get_flops.py文件计算fcos3d方法的flops?
  • ¥40 串口调试助手打开串口后,keil5的代码就停止了
  • ¥15 电脑最近经常蓝屏,求大家看看哪的问题
  • ¥60 高价有偿求java辅导。工程量较大,价格你定,联系确定辅导后将采纳你的答案。希望能给出完整详细代码,并能解释回答我关于代码的疑问疑问,代码要求如下,联系我会发文档
  • ¥50 C++五子棋AI程序编写
  • ¥30 求安卓设备利用一个typeC接口,同时实现向pc一边投屏一边上传数据的解决方案。
  • ¥15 SQL Server analysis services 服务安装失败