gpt4 book ai didi

javascript - 在 Internet Explorer 中使用 calc 转换翻译属性不起作用

转载 作者:太空宇宙 更新时间:2023-11-04 01:42:36 27 4
gpt4 key购买 nike

我在 Internet Explorer 中使用 calc 时遇到问题。我正在使用 transform: translate(calc(-50% + 10px), calc(-50% + 20px)),它在 Internet Explorer 中不起作用。

我知道transform: translate(0, calc(100% + 5px)) 在 Internet Explorer 中不起作用,但等效于 transform: translate(0, 100%) translate(0, 5px) 可在 IE 中运行。

有人可以帮助transform: translate(calc(-50% + 10px), calc(-50% + 20px)) 将其等效转换为在 IE 中工作。

最佳答案

把它分成不同的翻译:

   transform: translateX(-50%)
translateX(10px)
translateY(-50%)
translateY(20px);

关于javascript - 在 Internet Explorer 中使用 calc 转换翻译属性不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45144980/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com