gpt4 book ai didi

html - CSS 渐变在 Internet Explorer 中消失了

转载 作者:太空宇宙 更新时间:2023-11-04 14:08:38 26 4
gpt4 key购买 nike

好吧,我正在尝试使用在大多数浏览器上都非常漂亮的简单渐变。但是在我的笔记本电脑版本 11 上的 Internet Explorer 上;目前梯度应该是什么都不是空的空间。我认为这是跨浏览器显示渐变的正确方法,我是否遗漏了什么?

这是我的渐变:

background-image: -moz-linear-gradient(bottom, #292929 0%, #292929 50%, #333 50%, #333 100%);
background-image: -o-linear-gradient(bottom, #292929 0%, #292929 50%, #333 50%, #333 100%);
background-image: -webkit-linear-gradient(bottom, #292929 0%, #292929 50%, #333 50%, #333 100%);
background-image: linear-gradient(bottom, #292929 0%, #292929 50%, #333 50%, #333 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#292929', endColorstr='#333333',GradientType=0 )!important;

最佳答案

linear-gradient 的语法不正确。使用 to top 表示方向性。

http://jsfiddle.net/XHs2g/

background-image: -moz-linear-gradient(bottom, #292929 0%, #292929 50%, #333 50%, #333 100%);
background-image: -o-linear-gradient(bottom, #292929 0%, #292929 50%, #333 50%, #333 100%);
background-image: -webkit-linear-gradient(bottom, #292929 0%, #292929 50%, #333 50%, #333 100%);
background-image: linear-gradient(to top, #292929 0%, #292929 50%, #333 50%, #333 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#292929', endColorstr='#333333',GradientType=0 )!important;

关于html - CSS 渐变在 Internet Explorer 中消失了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20941558/

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