• 微信小程序样式旋转


    相关文档:http://www.w3school.com.cn/cssref/pr_transform.asp

    index.wxss文件

    注意:如果是web前端,要注意浏览器的兼容性

    .x1{
    46rpx;//元素的宽
    height: 40rpx;//元素的高
    top: 82rpx;//元素距离顶部的距离
    left:315rpx;//元素距离左边的距离
    transform-origin:50% 50%;//设置元素旋转的基本点
    position: absolute;
    transform: rotate(30deg);//30是元素旋转的度数
    }
    .x2{
    46rpx;
    height: 40rpx;
    top: 130rpx;
    left:365rpx;
    transform-origin:50% 50%;
    position: absolute;
    transform: rotate(60deg);
    }
    .x3{
    46rpx;
    height: 40rpx;
    top: 190rpx;
    left:384rpx;
    transform-origin:50% 50%;
    position: absolute;
    transform: rotate(90deg);
    }
    .x4{
    46rpx;
    height: 40rpx;
    top: 259rpx;
    left:365rpx;
    transform-origin:50% 50%;
    position: absolute;
    transform: rotate(120deg);
    }
    .x5{
    46rpx;
    height: 40rpx;
    top: 308rpx;
    left:315rpx;
    transform-origin:50% 50%;
    position: absolute;
    transform: rotate(150deg);
    }
    .x6{
    46rpx;
    height: 40rpx;
    top: 321rpx;
    left:256rpx;
    transform-origin:50% 50%;
    position: absolute;
    transform: rotate(180deg);
    }
    .x7{
    46rpx;
    height: 40rpx;
    top: 308rpx;
    left:198rpx;
    transform-origin:50% 50%;
    position: absolute;
    transform: rotate(210deg);
    }
    .x8{
    46rpx;
    height: 40rpx;
    top: 259rpx;
    left:147rpx;
    transform-origin:50% 50%;
    position: absolute;
    transform: rotate(240deg);
    }
    .x9{
    46rpx;
    height: 40rpx;
    top: 190rpx;
    left:129rpx;
    transform-origin:50% 50%;
    position: absolute;
    transform: rotate(270deg);
    }
    .x10{
    46rpx;
    height: 40rpx;
    top: 130rpx;
    left:147rpx;
    transform-origin:50% 50%;
    position: absolute;
    transform: rotate(300deg);
    }
    .x11{
    46rpx;
    height: 40rpx;
    top: 82rpx;
    left:188rpx;
    transform-origin:50% 50%;
    position: absolute;
    transform: rotate(330deg);
    }
    .viewblockzzround{
    position: absolute;
    height: 245rpx;
    246rpx;
    top: 120rpx;
    left: 156rpx
    }
    .blockzzround{
    100%;
    height:100%;
    }


    index.wxml文件

    <view class='viewblockzzround'>
    <image src='https://api.longfengqi.net.cn/little/zzround.png' class='blockzzround'></image>
    </view>
     
    <image src='/image/src/redchair.png' class='x0' ></image>
     
    <image src='/image/src/redchair.png' class='x1'></image>
     
    <image src='/image/src/redchair.png' class='x2'></image>
     
    <image src='/image/src/redchair.png' class='x3'></image>
     
    <image src='/image/src/redchair.png' class='x4'></image>
     
    <image src='/image/src/redchair.png' class='x5'></image>
     
    <image src='/image/src/redchair.png' class='x6'></image>
     
    <image src='/image/src/redchair.png' class='x7'></image>
     
    <image src='/image/src/redchair.png' class='x8'></image>
     
    <image src='/image/src/redchair.png' class='x9'></image>
     
    <image src='/image/src/redchair.png' class='x10'></image>
     
    <image src='/image/src/redchair.png' class='x11'></image>
     

    最终效果图:

      

  • 相关阅读:
    [推荐]大量 Blazor 学习资源(二)
    [翻译]欢迎使用C#9.0
    重磅消息:微软发布多平台应用UI框架 MAUI,网友直呼:牛x
    如何对Git的分支进行管理
    如何使用JPA的@Formula注解
    伤其十指,不如断其一指,谈谈我的学习计划
    如何使用Swagger-UI在线生成漂亮的接口文档
    如何在Linux服务器上部署jar包
    使用PageHelper插件分页时,如何对对象进行转换以及添加属性
    在Java中使用Collections.sort 依据多个字段排序
  • 原文地址:https://www.cnblogs.com/ttqi/p/10577330.html
Copyright © 2020-2023  润新知