如何在转换,过渡中表达多个属性?

发布于 2025-02-13 04:52:01 字数 143 浏览 3 评论 0 原文

  transform: translateX(25px) ;
  transition-delay: 0.05s;
  transition-duration: 0.25s;

我可以将上面的句子压入一个句子吗? 提前致谢

  transform: translateX(25px) ;
  transition-delay: 0.05s;
  transition-duration: 0.25s;

Can I compress above sentence into one sentence?
Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼睛会笑 2025-02-20 04:52:01

否。变换过渡 - *属性彼此无关。

可以使用 过渡 shorthand属性,但这可能会重置其他过渡 - *您未显示的属性。同样,将属性分开使CSS更好地可读(这应该比创建较短的源代码的优先级)。

transition: 0.25s 0.05s;

No. the transform and transition-* properties are unrelated to each other.

It may be possible to combine the two transition-* properties using the transition shorthand property, but that may reset other transition-* properties that you didn't show. Also keeping the properties separate makes the CSS better readable (which should be a priority over creating shorter source code).

transition: 0.25s 0.05s;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文