我在 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/