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

index.wxss文件

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


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

最终效果图:

  

微信小程序样式旋转的更多相关文章

  1. 微信小程序(7)--微信小程序连续旋转动画

    微信小程序连续旋转动画 https://mp.weixin.qq.com/debug/wxadoc/dev/api/api-animation.html <view animation=&quo ...

  2. 微信小程序学习笔记(1)-微信小程序样式设置逻辑

    1.微信小程序的样式设置统一在每一页的.wxss的样式文件中,所有的样式设置代码统一写入这个文件中: 2.样式主要是通过.wxml里面控件的“class”属性来调用,此处调用会有几个细节要注意: 1) ...

  3. 微信小程序连续旋转动画this.animation.rotate

    一..js中封装旋转动画方法 添加animation属性 data:{ animation:''" } 改变animation的值(官网提供角度范围是-180~180,但是我发现角度越大会一 ...

  4. 微信小程序样式wxss各种问题总结(不断更新)

    1)加入其它样式文件 @import '/css/dialog.wxss'; //注意:必须结尾用分号 2)隐藏滚动条 ::-webkit-scrollbar { width:; height:; c ...

  5. 微信小程序 教程及示例

    作者:初雪链接:https://www.zhihu.com/question/50907897/answer/128494332来源:知乎著作权归作者所有,转载请联系作者获得授权.微信小程序正式公测, ...

  6. 微信小程序初使心得【微信小程序快速入门】

    摘要: 2016年推出微信小程序,时至今日,历经几个版本的更新,已形成了相对实用和稳定的服务平台.本文简单的介绍了微信小程序的入门用法,今后会继续关注和实践. 2016年推出微信小程序,时至今日,历经 ...

  7. 微信小程序踩坑集合

    1:官方工具:https://mp.weixin.qq.com/debug/w ... tml?t=1476434678461 2:简易教程:https://mp.weixin.qq.com/debu ...

  8. 原创:新手布局福音!微信小程序使用flex的一些基础样式属性

    来源:新手布局福音!微信小程序使用flex的一些基础样式属性 作者:Nazi   Flex布局相对于以前我们经常所用到的布局方式要好的很多,在做微信小程序的时候要既能符合微信小程序的文档开发要求,又能 ...

  9. 微信小程序 JS动态修改样式

    微信小程序这个坑啊,js动态修改样式,我们并不能用js或者jq 轻轻松松一行代码搞定.或者用removeClass addClass 来修改样式. 以下是一种动态修改样式的方法,原理是绑定数据,然后动 ...

随机推荐

  1. $Django 路飞之显示视频,Redis存购物车数据,优惠卷生成表,优惠卷的一个领取表。(知识小回顾)

    知识小回顾之json序列化问题 精髓:支持python的几种数据类型(注意不是对象,不能放对象),其次是tuple变list. ensure_ascii:默认值True,如果dict内含有non-AS ...

  2. AngularJS 作用域(Scope)

    AngularJS作用域(Scope) Scope作用域是应用在视图和控制器之间的纽带,Scope是一个对象包含可用的方法和属性,Scope可以应用在试图和控制器上. $scope是针对当前的cont ...

  3. JVM·垃圾收集器与内存分配策略之垃圾回收算法!

    1.垃圾回收算法    1.1.标记-清除算法(Mark-Sweep):             过程分为“标记”和“清除”两个过程.先将所有需要回收的目标统一标记,然后再统一清除.          ...

  4. js检测数据类型四种办法

    面试题中经常会考js数据类型检测,今天我来分享一下js中常用的四种方法判断数据类型,欢迎指点更正. 废话不多说,直入正题. 1.typeof console.log(typeof "&quo ...

  5. ES6随笔

    let, const 这两个的用途与var类似,都是用来声明变量的,但在实际运用中他俩都有各自的特殊用途.首先来看下面这个例子: var name = 'zach' while (true) { va ...

  6. vs2010编译error_code

    C1083 : 现象: xxxxx.cpp clxx:fatal error C1083:无法打开源文件: “..\..\..\..\src\folder1\folder2\folder3\folde ...

  7. net core体系-web应用程序-4asp.net core2.0 项目实战(任务管理系统)-2项目搭建

    系统要求 首先建议采用 Windows 10 专业版/企业版/教育版,且必须是64位操作系统,原因是docker装起来比较方便,Win7装起来比较麻烦,且不确定是否有其他问题(自己没有实践过) 其次W ...

  8. Django模型初识

    模型层(what.why.how) 模型的相关配置

  9. HDFS及其各组件的机制

    一.HDFS运行机制 概述:用户的文件会被切块后存储在多台datanode节点中,并且每个文件在整个集群中存放多个副本,副本的数量可以通过修改配置自己设定. HDFS:Hadoop Distribut ...

  10. 2018-2019-1 20189201 《LInux内核原理与分析》第八周作业

    只有在天足够黑的时候你才能看到星星. BY WAY GK 加油 一.书本第七章知识总结[可执行程序工作原理] 1. ELF目标文件格式 ELF全称Executable and Linkable For ...