微信小程序样式旋转
相关文档: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文件
最终效果图:

微信小程序样式旋转的更多相关文章
- 微信小程序(7)--微信小程序连续旋转动画
微信小程序连续旋转动画 https://mp.weixin.qq.com/debug/wxadoc/dev/api/api-animation.html <view animation=&quo ...
- 微信小程序学习笔记(1)-微信小程序样式设置逻辑
1.微信小程序的样式设置统一在每一页的.wxss的样式文件中,所有的样式设置代码统一写入这个文件中: 2.样式主要是通过.wxml里面控件的“class”属性来调用,此处调用会有几个细节要注意: 1) ...
- 微信小程序连续旋转动画this.animation.rotate
一..js中封装旋转动画方法 添加animation属性 data:{ animation:''" } 改变animation的值(官网提供角度范围是-180~180,但是我发现角度越大会一 ...
- 微信小程序样式wxss各种问题总结(不断更新)
1)加入其它样式文件 @import '/css/dialog.wxss'; //注意:必须结尾用分号 2)隐藏滚动条 ::-webkit-scrollbar { width:; height:; c ...
- 微信小程序 教程及示例
作者:初雪链接:https://www.zhihu.com/question/50907897/answer/128494332来源:知乎著作权归作者所有,转载请联系作者获得授权.微信小程序正式公测, ...
- 微信小程序初使心得【微信小程序快速入门】
摘要: 2016年推出微信小程序,时至今日,历经几个版本的更新,已形成了相对实用和稳定的服务平台.本文简单的介绍了微信小程序的入门用法,今后会继续关注和实践. 2016年推出微信小程序,时至今日,历经 ...
- 微信小程序踩坑集合
1:官方工具:https://mp.weixin.qq.com/debug/w ... tml?t=1476434678461 2:简易教程:https://mp.weixin.qq.com/debu ...
- 原创:新手布局福音!微信小程序使用flex的一些基础样式属性
来源:新手布局福音!微信小程序使用flex的一些基础样式属性 作者:Nazi Flex布局相对于以前我们经常所用到的布局方式要好的很多,在做微信小程序的时候要既能符合微信小程序的文档开发要求,又能 ...
- 微信小程序 JS动态修改样式
微信小程序这个坑啊,js动态修改样式,我们并不能用js或者jq 轻轻松松一行代码搞定.或者用removeClass addClass 来修改样式. 以下是一种动态修改样式的方法,原理是绑定数据,然后动 ...
随机推荐
- springboot ****使用经验*******
目录 1. 返回时间格式化问题 2. springboot 中获取属性 3. SpringBoot中启动是忽略某项检测 4. 启动不开启安全校验 一返回时间格式化问题 在Spring Boot项目中 ...
- activiti工作流笔记
什么是activiti? Activiti是一个身经百战的业务流程管理引擎, 并且还是一个流程平台 为什么要用工作流引擎? 简单来说,就是为了统一管理流程业务. 想想看,如果要设计一个流程的程序,通常 ...
- Python中的 @staticmethod@classmethod方法
python类中有三种方法,常见的是实例方法,另外两种是staticmethod装饰的静态方法,和classmethod装饰的类方法. 1.对比 流畅的python里,用一个例子进行了对比: (1)两 ...
- Sprite组件和Button组件的使用
一.Sprint组件的使用 1.游戏中显示一张图片,通常我们称之为"精灵" sprite 2.cocos creator如果需要显示一个图片,那么需要在节点上挂一个精灵组件,为这个 ...
- Centos系统中彻底删除Mysql数据库
步骤: 1.输入命令查询系统中已安装的mysql. rpm -qa |grep -i mysql 2.逐个卸载mysql. yum remove 系统显示已安装的mysql 比如:yum remove ...
- 使用kubeadm创建kubernets集群
参考: http://docs.kubernetes.org.cn/459.html https://blog.csdn.net/gui951753/article/details/833169 ...
- CentOS 7 yum方式快速安装MongoDB
一.安装环境及配置yum # more /etc/redhat-release CentOS Linux release 7.2.1511 (Core) # vi /etc/yum.repos.d/m ...
- get、put、post、delete含义与区别
1.GET请求会向数据库发索取数据的请求,从而来获取信息,该请求就像数据库的select操作一样,只是用来查询一下数据,不会修改.增加数据,不会影响资源的内容,即该请求不会产生副作用.无论进行多少次操 ...
- 2017-11-8—自动控制原理在软硬件方面上的应用和体现
这个话题讲起来是非常大的,先贴一下百度百科的定义: 自动控制(automatic control)是指在没有人直接参与的情况下,利用外加的设备或装置,使机器.设备或生产过程的某个工作状态或参数自动地按 ...
- 机器学习——线性回归-KNN-决策树(实例)
导入类库 import numpy as np import pandas as pd from sklearn.linear_model import LinearRegression from s ...