gpt4 book ai didi

html - 如何将渐变应用于在 IE9 中正确显示的元素?

转载 作者:太空宇宙 更新时间:2023-11-04 13:59:32 24 4
gpt4 key购买 nike

我想对我的元素应用渐变。我用得更少。

对于 IE9,我使用以下 css:

-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=@FirstColour, endColorstr=@SecondColour)";

其中@FirstColour =#b7d4ee 和@SecondColour=#7a9eca;

就是这样的渐变: enter image description here

但是在上面定义了 css-style 的 IE9 中,我看到的渐变是这样的: enter image description here

当在 IE9 浏览器中加载页面时,我的 less 没有被编译(不知道为什么)并呈现为:

filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='@FirstColour', endColorstr='@SecondColour')

如何在IE9中使用较少的方法来获得正常的渐变显示?

最佳答案

使用梯度生成器 here它为包括IE在内的所有浏览器提供了所有的渐变解决方案。那里解释了说明

关于html - 如何将渐变应用于在 IE9 中正确显示的元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21622450/

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