【问题标题】:Shift and Rotation Using CSS [duplicate]使用 CSS 进行移位和旋转 [重复]
【发布时间】:2016-06-29 22:36:45
【问题描述】:

我希望每个人今天都做得很好。 我是 HTML 和 CSS 的新手,非常感谢您的帮助。 当我将鼠标悬停在图像上时,我想(同时)移动和旋转图像。但是,我只能实现旋转或移动,但不能同时实现。我想用 CSS 来做这件事,这里是代码。

一般来说,我使用 Mozilla Firefox 来测试我的大部分 HTML 和 CSS 代码,但我知道对于 Google Chrome 和 IE,我应该使用类似的代码,例如 -webkit-transform 和 -ms-transform。

谢谢!

.data3 img:hover{
transform:rotate (70deg);
transform: translate3d(80px,0px,0px);
transition: transform .5s ease-out;/*want to rotate and shift slowly*/
}

【问题讨论】:

    标签: html css


    【解决方案1】:

    将 tanslate 和旋转命令放在一起:

    transform: rotate(90deg) translateX(50px);
    

    已经回复here

    【讨论】:

    • 非常感谢,它有效:)
    猜你喜欢
    • 1970-01-01
    • 2015-09-01
    • 2021-03-27
    • 1970-01-01
    • 1970-01-01
    • 2011-02-19
    • 1970-01-01
    • 2016-07-09
    • 2016-04-02
    相关资源
    最近更新 更多