我在使用 100% 宽度/高度 div 的 CSS 渐变背景时遇到问题。这只是 Chrome 中的一个问题。我在 div 上有一些内容,当我将鼠标悬停在该 div 中的链接上时,渐变背景以奇怪的方式中断,并且基本上根本不显示 Angular (只是显示为水平渐变)。这是我的 CSS:
.landing{
display: block;
width: 100%;
min-height: 100%;
background: #f6e25a;
background: -moz-linear-gradient(-80deg,#f6e25a 0%,#f6e25a 35%,#f8e979 35.01%,#f6e25a 100%);
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#f6e25a), color-stop(35%,#f6e25a), color-stop(35.1%,#f8e979), color-stop(100%,#f6e25a));
background: -webkit-linear-gradient(-80deg,#f6e25a 0%,#f6e25a 35%,#f8e979 35.01%,#f6e25a 100%);
background: -o-linear-gradient(-80deg,#f6e25a 0%,#f6e25a 35%,#f8e979 35.01%,#f6e25a 100%);
background: -ms-linear-gradient(-80deg,#f6e25a 0%,#f6e25a 35%,#f8e979 35.01%,#f6e25a 100%);
background: linear-gradient(150deg,#f6e25a 0%,#f6e25a 35%,#f8e979 35.01%,#f6e25a 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f6e25a', endColorstr='#f6e25a',GradientType=1 );
}
这是它在 Chrome 中的样子:
有什么线索吗?
最佳答案
这是 Chrome 中的一个已知错误。它于 2012 年 11 月首次出现,目前优先级为 2,因此可能不会在下一版本中修复。请参阅 Chromium 开发论坛 here
如果您稍微改变 Angular ,它应该会再次起作用。尝试使用 -78deg 而不是 -80deg
关于google-chrome - 带 Angular CSS 渐变背景的 Chrome 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15009807/