2017-07-17 47 views
0

我正在面对在Internet Explorer中使用calc的问题。 我正在使用transform: translate(calc(-50% + 10px), calc(-50% + 20px)),这在Internet Explorer中不起作用。转换翻译属性无法在Internet Explorer中使用calc

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

有人可以帮助transform: translate(calc(-50% + 10px), calc(-50% + 20px))转换它相当于它在IE中工作。

回答

2

只是把它分解成不同的翻译:

transform: translateX(-50%) 
       translateX(10px) 
       translateY(-50%) 
       translateY(20px); 
相关问题