当前位置:网站首页>Invalid transform origin base point setting
Invalid transform origin base point setting
2022-04-22 06:07:00 【A hundred years of life when crazy】
Desired rotation effect :

<!DOCTYPE html>
<html>
<head>
<title>test document</title>
<link rel="stylesheet" type="text/css" href="./test.css">
</head>
<body>
<div style="height: 300px;width: 300px;background-color: rgb(0,185,209);">
<div class="q">
</div>
</div>
</body>
</html>
test.css Code .q{
position: absolute;
height: 100px;
width: 100px;
background-color: red;
transform: rotate(45deg);
-webkit-transform:rotate(45deg);
transform-origin: left top;
-webkit-transform-origin:left top;
transition:2s;
}
transform-origin Set up ,transition The effect rotates first according to the center 2s Then align the base point , as follows :

It does not rotate with the set base point as the rotation point as expected .
Headache for a long time , It turns out that the problem is transition On the body , Assign it to transform The transition time is 2s that will do :
transition:transform 2s;
版权声明
本文为[A hundred years of life when crazy]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220539347529.html
边栏推荐
- VB操作excel 格式设置及打印页面设置(精简)
- LeetCode: 322. Change exchange (dynamic programming, recursion, memo recursion and backtracking)
- ocilib库连接oracle
- 用MOS管构成H桥的心得
- CAN 数据帧,远程帧,错误帧,以及出错重连
- stm32单片机与LD3320语音模块交互法一
- m1芯片上编译arm64的openssl
- ADC key for learning of Blue Bridge Cup embedded expansion board
- stm32单片机与LD3320语音模块交互法二
- Intel SGX线程锁
猜你喜欢
随机推荐
CMake及交叉工具编译链的安装使用
STM32 learning note 1 - the simplest GPIO
Add a minimize button to the CPropertySheet window
Installation and use of cmake and cross tool compilation chain
stm32单片机与LD3320语音模块交互法二
STM32学习笔记2——设置GPIO寄存器实现流水灯
二分查找及其经典应用(左边界,右边界等)
第90篇 LeetCode剑指Offer动态规划(七)最长不包含重复字符的子字符串
Rtl8367 learning note 2 - network configuration operation literacy
第74篇 LeetCode题目练习(七) 7.整数反转
QT学习之设置时间日期显示
IWDG
LeetCode 898. Subarray bitwise OR operation - set
STM32 learning note 5 - Calculation of relative position of RGB screen
蓝桥杯嵌入式扩展板学习之光敏电阻
Usage of tcpdump
stm32学习笔记5——RGB屏相对位置计算
日常学习记录——读取自定义数据集
15 - container - Dictionary
蓝桥杯嵌入式扩展板学习之LIS302DL









