栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

Internet Explorer中的渐变颜色

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Internet Explorer中的渐变颜色

我用于所有浏览器渐变的代码:

background: #0A284B;background: -webkit-gradient(linear, left top, left bottom, from(#0A284B), to(#135887));background: -webkit-linear-gradient(#0A284B, #135887);background: -moz-linear-gradient(top, #0A284B, #135887);background: -ms-linear-gradient(#0A284B, #135887);background: -o-linear-gradient(#0A284B, #135887);background: linear-gradient(#0A284B, #135887);filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0A284B', endColorstr='#135887');zoom: 1;

您需要指定一个高度或zoom: 1将其应用于hasLayoutIE中的元素。

更新:

这是面向所有LESS用户的LESS Mixin(CSS)版本:

.gradient(@start, @end) {    background: mix(@start, @end, 50%);    filter: ~"progid:DXImageTransform.Microsoft.gradient(startColorStr="@start~", EndColorStr="@end~")";    background: -webkit-gradient(linear, left top, left bottom, from(@start), to(@end));    background: -webkit-linear-gradient(@start, @end);    background: -moz-linear-gradient(top, @start, @end);    background: -ms-linear-gradient(@start, @end);    background: -o-linear-gradient(@start, @end);    background: linear-gradient(@start, @end);    zoom: 1;}


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/568363.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号