gpt4 book ai didi

css - 使用 CSS 的锯齿状边缘无法在 IE 中正确呈现

转载 作者:太空宇宙 更新时间:2023-11-04 15:05:20 25 4
gpt4 key购买 nike

我想在我的网页底部添加这样的锯齿效果。

http://d.pr/i/GpOb

我设法找到了一些在所有浏览器中都能很好地工作的代码,但 Internet Explorer 除外,我得到了以下结果。

http://d.pr/i/VdLe

不幸的是,避免使用 Internet Explorer 不是一种选择,我对如何解决这个问题的知识有限。

这是我在 CSS 文件中使用的代码。

            #footer {
position:relative;
width: 100%;
height: 280px;
margin-top:5px;
background-color: #ab1919 ;
z-index:1;
border-bottom: 10px ridge #ab1919 ;
}


#footer:before {

content: " ";
display:block;
position: relative;
top:0px;left:0px;
width:100%;
height:36px;
background: linear-gradient(#fff 0%, transparent 0%), linear-gradient(135deg, #ab1919 33.33%, transparent 33.33%) 0 0%, #ab1919 linear-gradient(45deg, #ab1919 33.33%, #fff 33.33%) 0 0%;
background: -webkit-linear-gradient(#fff 0%, transparent 0%), -webkit-linear-gradient(135deg, #ab1919 33.33%, transparent 33.33%) 0 0%, #ab1919 -webkit-linear-gradient(45deg, #ab1919 33.33%, #fff 33.33%) 0 0%;
background: -o-linear-gradient(#fff 0%, transparent 0%), -o-linear-gradient(135deg, #ab1919 33.33%, transparent 33.33%) 0 0%, #ab1919 -o-linear-gradient(45deg, #ab1919 33.33%, #fff.33%) 0 0%;
background: -moz-linear-gradient(#fff 0%, transparent 0%), -moz-linear-gradient(135deg, #ab1919 33.33%, transparent 33.33%) 0 0%, #ab1919 -moz-linear-gradient(45deg, #ab1919 33.33%, #fff 33.33%) 0 0%;
background-repeat: repeat-x;
background-size: 0px 100%, 9px 27px, 9px 27px;
}

如果有人可以帮助解决这个问题,我将永远感激不已。

谢谢

最佳答案

你可以用图像演示来做到这一点 http://jsfiddle.net/kevinPHPkevin/YyyP9/

body, html {
height:100%; background:url(http://www.hscripts.com/freeimages/icons/symbols/shapes/triangle/triangle-image8.gif);
background-repeat:repeat-x;
background-position:bottom;
}

关于css - 使用 CSS 的锯齿状边缘无法在 IE 中正确呈现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15957542/

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