css - Internet Explorer - IE,线性渐变(linear-gradient)
问题描述
再会。
我在 IE 11 上测试线性渐变时遇到问题。在我测试过的所有其他浏览器中,包括 Chrome、FireFox、Edge 等。一切都按预期工作,但 IE 无法正确渲染。
在我寻找答案的过程中,我查看了多个堆栈溢出帖子——帖子一和帖子二。尽管这些帖子和其他帖子提供了一些见解,但根据我的评论,我的 CSS 应该可以工作 - 见下文。
CSS{
background-color: rgba(0, 0, 0, 0.6) 50%;
background: -webkit-gradient(linear, left top, left bottom, from(rgba(0,
0, 0, 0.6) 50%), to(transparent));
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.6) 50%,
transparent);
background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.6) 50%,
transparent);
background: -ms-linear-gradient(top, rgba(0, 0, 0, 0.6) 50%,
transparent);
background: -o-linear-gradient(top, rgba(0, 0, 0, 0.6) 50%,
transparent);
display: block;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-
}
在上面的 CSS 中,我假设我需要调整与 -ms-linear-gradient 线相关的内容。我还包括了一张图片以供审查;最上面的图片是我想要的东西在 IE 中的样子。
如果有人可以提供任何额外的观点或见解,将不胜感激。
解决方案
推荐阅读
- php - Laravel 8 上未应用默认值
- dispose - Tone.js 更改 Tone.Polysynth 的问题
- angular - Angular 11严格模式如何在循环中按属性比较对象
- excel - 将旧值替换为 Excel 表中的新值
- python - 从文本文件中读取随机行 - python
- python-3.x - 将变量传递给函数返回空列表
- python - Python:获取通过管道传输到标准输入的文件名
- python - 如何用 sympy 和 sigma 和 mutiple 写出这个方程?
- python - 用于返回最新并使用不同列的 flask-sqlalchemy 查询
- python - 问题循环回到程序的开始