如何在CSS中为元素设置旋转点? [英] How can I set a rotation point for an element in CSS?
本文介绍了如何在CSS中为元素设置旋转点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在CSS中设置旋转点?默认旋转点为50%,50%. 我试过了:
Is it possible to set the rotation point in CSS? The default rotation point is at the 50%, 50%. I tried:
transform: rotate(230deg);
rotation-point:90% 90%;
但这不起作用...有什么建议吗?
But it does not work... Any suggestions?
推荐答案
这将在元素的左上角设置旋转枢轴点并将其旋转:
This will set the rotation pivot point on top-left corner of your element and rotate it:
transform: rotate(-25deg);
transform-origin: 0% 0%;
浏览.nav_item_txt
类:
这篇关于如何在CSS中为元素设置旋转点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文