zoukankan      html  css  js  c++  java
  • 微信小程序样式旋转

    相关文档: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>
     

    最终效果图:

      

  • 相关阅读:
    Loadrunner将字符串存为参数
    loadrnner添加C语言代码的几种方式
    Jmeter分布式
    Java jmx的使用
    Jmeter关联之正则表达式提取器(完整版)
    性能测试基础概念
    Jmeter实现百分比业务比例
    js闭包与java内部类
    程序员的足球
    虚拟机下Linux读取USB设备的问题虚拟机下Linux无法读取USB设备的解决方案
  • 原文地址:https://www.cnblogs.com/ttqi/p/10577330.html
Copyright © 2011-2022 走看看