gpt4 book ai didi

css - IE10、IE11 中的跨浏览器 css 渐变

转载 作者:行者123 更新时间:2023-12-04 21:51:17 26 4
gpt4 key购买 nike

我在所有浏览器中为深色按钮做了一个渐变,它看起来不错,除了 IE10,IE11 版本。顶部和底部有浅色条纹。我通过 colorzilla 渐变编辑器生成渐变。

link to buttons

enter image description here

HTML

<div class="dark-button">div button</div>

CSS

.dark-button {
background: #0874b6; /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzM0ODliZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMTZjYWQiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(top, #0874b6 0%, #016cad 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0874b6), color-stop(100%, #016cad)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #0874b6 0%, #016cad 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #0874b6 0%, #016cad 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #0874b6 0%, #016cad 100%); /* IE10+ */
background: linear-gradient(to bottom, #0874b6 0%, #016cad 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0874b6', endColorstr='#016cad', GradientType=0); /* IE6-8 */
border: 1px solid #016cad;
border-radius: 3px;
color: #f1f1f1;
cursor: default;
display: inline-block;
margin: 5px;
padding: 6px 9px;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);

我该如何解决?

最佳答案

我用它们做我想要的白色到浅红色从上到下。测试:Windows 8.1 中的 FireFox 33.0.3Windows 8.1 中的 IE 11.0.13Windows 8.1 中的 Opera 25Windows 8.1 中的 Chrome 38OS X 10.10 (Yosemite) 中的 Safari 8.0OS X 10.10 (Yosemite) 中的 Firefox 26.0

background: #ffffff; 
background: -webkit-linear-gradient(bottom, #d85570, white); /* For Safari 5.1 to 6.0 */
background: -moz-linear-gradient(top, white, #d85570); /* For Firefox 3.6 to 15 */
background: -o-linear-gradient(white, #d85570); /* For Opera 11.1 to 12.0 */
background: linear-gradient(top,#d85570, white); /* Standard syntax */
background: linear-gradient(to bottom, #white, #d85570); /* IE ? */
background: -ms-linear-gradient(top, #ffffff, #d85570); /* IE 11 */

关于css - IE10、IE11 中的跨浏览器 css 渐变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25057653/

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