IE 渐变过滤器中的颜色函数
已尝试各种“转义”功能,但似乎无法使以下功能正常工作...
.background-radial(@colour, @depth: 20%) {
filter: ~"progid:DXImageTransform.Microsoft.gradient( startColorstr='@{colour}', endColorstr='darken(@{colour},@{depth})',GradientType=1 )"; /* IE6-9 fallback on horizontal gradient */
}
调用
body {
.background-radial(rgb(225,225,255));
}
由渲染
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e1e1e1', endColorstr='darken(#e1e1e1,20)',GradientType=1 );
,因为问题是试图确保“变暗”(或任何其他颜色功能)在过滤器转义内工作。我猜我一直错误地使用转义序列。
Have tried various "escape" functions but can't seem to get the below working...
.background-radial(@colour, @depth: 20%) {
filter: ~"progid:DXImageTransform.Microsoft.gradient( startColorstr='@{colour}', endColorstr='darken(@{colour},@{depth})',GradientType=1 )"; /* IE6-9 fallback on horizontal gradient */
}
called by
body {
.background-radial(rgb(225,225,255));
}
Renders as
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e1e1e1', endColorstr='darken(#e1e1e1,20)',GradientType=1 );
Problem is trying to ensure the "darken" (or any other colour function) works within the filter escape. I'm guessing i've been using the escape sequences incorrectly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过一个额外的变量来解决这个问题:
You can work around this through an extra variable: