关于CSS径向渐变不适用于Safari中的按钮和径向渐变html的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于Angular4动画不适用于SafariiOS9.3、Angular2应用程
关于CSS 径向渐变不适用于 Safari 中的按钮和径向渐变html的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于Angular 4动画不适用于Safari iOS 9.3、Angular2应用程序适用于Chrome和IE,但不适用于Firefox或Safari、CSS3 – Flex包装不适用于IOS 10.1.1 Safari和Chrome、css3 – 为什么我的div背景渐变不适用于IE9等相关知识的信息别忘了在本站进行查找喔。
本文目录一览:- CSS 径向渐变不适用于 Safari 中的按钮(径向渐变html)
- Angular 4动画不适用于Safari iOS 9.3
- Angular2应用程序适用于Chrome和IE,但不适用于Firefox或Safari
- CSS3 – Flex包装不适用于IOS 10.1.1 Safari和Chrome
- css3 – 为什么我的div背景渐变不适用于IE9
CSS 径向渐变不适用于 Safari 中的按钮(径向渐变html)
如何解决CSS 径向渐变不适用于 Safari 中的按钮?
我正在使用径向渐变为我的按钮文本提供渐变颜色,它在 Chrome 中有效,但在 safari 中无效,这是怎么回事?
.subscribe-button {
font-family: ''spantaranregular'';
font-size: 24px;
background: #e5cf84;
background: -webkit-radial-gradient(circle farthest-corner at center center,#e5cf84 0%,#B79244 100%);
background: -moz-radial-gradient(circle farthest-corner at center center,#B79244 100%);
background: radial-gradient(circle farthest-corner at center center,#B79244 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
<button>Subscribe</button>
任何帮助将不胜感激。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
Angular 4动画不适用于Safari iOS 9.3
和小时试图解决它我来寻求帮助.提前致谢.
我的代码是:
的package.json
"dependencies": { "@angular/animations": "^4.3.2","@angular/cdk": "^2.0.0-beta.8","@angular/common": "^4.0.0","@angular/compiler": "^4.0.0","@angular/core": "^4.0.0","@angular/forms": "^4.0.0","@angular/http": "^4.0.0","@angular/material": "^2.0.0-beta.8","@angular/platform-browser": "^4.0.0","@angular/platform-browser-dynamic": "^4.0.0","@angular/router": "^4.0.0","@ngx-Meta/core": "^0.4.0-rc.2","@ngx-translate/core": "^7.1.0","@ngx-translate/http-loader": "^1.0.1","angular2-moment": "^1.6.0","core-js": "^2.4.1","express": "^4.15.4","lodash": "^4.17.4","ng2-pdf-viewer": "^1.1.1","ng2-translate": "^5.0.0","rxjs": "^5.4.1","web-animations-js": "^2.3.1","zone.js": "^0.8.14" },
landing.component.ts
import { Component,HostBinding,ChangeDetectionStrategy } from '@angular/core'; import { stateTransition } from '../routing.animations'; @Component({ selector: 'cp-landing',templateUrl: './landing.component.html',styleUrls: ['./landing.component.css'],changeDetection: ChangeDetectionStrategy.OnPush,animations: [ stateTransition() ] }) export class LandingComponent { @HostBinding('@stateTransition') ''; }
routing.animations.ts
import { trigger,state,animate,style,transition } from '@angular/animations'; export function stateTransition() { return trigger('stateTransition',[ state('void',style({ transform: 'translateY(50%)',opacity: 0 })),state('*',style({ transform: 'translateY(0%)',opacity: 1 })),// enter animation transition('void => *',animate('.5s 500ms')),// exit animation transition('* => void',animate('.5s')) ]); }
我试着想出一个小提琴,但我无法重现错误.
见:How to add Web Animations API polyfill to an Angular 2 project created with Angular CLI
(复制下面的最佳答案)
使用较新的Webpack版Angular CLI添加polyfill更容易:
安装时
npm install web-animations-js --save
添加到polyfills.ts:
require('web-animations-js/web-animations.min');
如果我这样做,它也有效
import 'web-animations-js/web-animations.min';
Angular2应用程序适用于Chrome和IE,但不适用于Firefox或Safari
FIREFOX:
改变对象的[[Prototype]]会导致代码运行得非常慢;而是使用Object.create es6-shim.js创建具有正确的初始[[Prototype]]值的对象:1338:11
Angular 2正在开发模式下运行.调用enableProdMode()以启用生产模式. angular2.dev.js:351:5
EXCEPTION:错误:期望int32作为第二个参数angular2.dev.js:23524
browserDomAdapter</browserDomAdapter.prototype.logError() angular2.dev.js:23514 browserDomAdapter</browserDomAdapter.prototype.logGroup() angular2.dev.js:23525 ExceptionHandler</ExceptionHandler.prototype.call() angular2.dev.js:1145 PlatformRef_</PlatformRef_.prototype._initApp/</<() angular2.dev.js:14801 ngzone</ngzone.prototype._notifyOnError() angular2.dev.js:5796 ngzone</ngzone.prototype._createInnerZone/errorHandling<.onError() angular2.dev.js:5700 run() angular2-polyfills.js:141 map@http://localhost:53861/lib/es6-shim/es6-shim.js:1113:14 TemplateParseVisitor</TemplateParseVisitor.prototype._createDirectiveAsts@http://localhost:53861/lib/anguar2/angular2.dev.js:24301:27 TemplateParseVisitor</TemplateParseVisitor.prototype.visitElement@http://localhost:53861/lib/anguar2/angular2.dev.js:24154:24 HtmlElementAst</HtmlElementAst.prototype.visit@http://localhost:53861/lib/anguar2/angular2.dev.js:20216:14 htmlVisitAll/<@http://localhost:53861/lib/anguar2/angular2.dev.js:20227:23 forEach@http://localhost:53861/lib/es6-shim/es6-shim.js:1107:14 htmlVisitAll@http://localhost:53861/lib/anguar2/angular2.dev.js:20226:5 TemplateParser</TemplateParser.prototype.parse@http://localhost:53861/lib/anguar2/angular2.dev.js:24038:20 TemplateCompiler</TemplateCompiler.prototype._compileComponentRuntime/done<@http://localhost:53861/lib/anguar2/angular2.dev.js:24669:32 run@http://localhost:53861/lib/anguar2/angular2-polyfills.js:138:14 ngzone</ngzone.prototype._createInnerZone/<.$run/<@[…]
苹果浏览器:
EXCEPTION: Error during instantiation of browserDetails! (Token Promise<ComponentRef> -> DynamicComponentLoader -> Compiler -> RuntimeCompiler -> ProtoViewFactory -> Renderer -> Domrenderer -> AnimationBuilder -> browserDetails). angular2.dev.js:23514ORIGINAL EXCEPTION: TypeError: 'undefined' is not a function (evaluating 'window.requestAnimationFrame(callback)')
Potentially unhandled rejection [2] Error: EXCEPTION: Error during instantiation of browserDetails! (Token Promise<ComponentRef> -> DynamicComponentLoader -> Compiler -> RuntimeCompiler -> ProtoViewFactory -> Renderer -> Domrenderer -> AnimationBuilder -> browserDetails). ORIGINAL EXCEPTION: TypeError: 'undefined' is not a function (evaluating 'window.requestAnimationFrame(callback)') Error loading http://localhost:53861/app/bootDesktop.js
关于什么是错误的任何想法都非常感激.看起来它与“browserDomAdapter”有关.
CSS3 – Flex包装不适用于IOS 10.1.1 Safari和Chrome
Jsfiddle演示:https://jsfiddle.net/9dscc1Lq/
码:
<style> body { width: 300px; } .tabs { width: 100%; display: flex; display: -webkit-flex; flex-wrap: wrap; -webkit-flex-wrap: wrap; flex: 0 0 auto; -webkit-flex: 0 0 auto; Box-sizing: border-Box; flex-flow: row wrap; -webkit-flex-flow: row wrap; } .tab { border: 1px solid #3A3A3A; color: #929292; min-width: 50%; Box-sizing: border-Box; flex: 1 1 0; -webkit-flex: 1 1 0; text-align: center; } </style> <div> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </div>
预期布局(正确):
iOS行为(不正确):
请指教!
解决方法
Src:https://bugs.webkit.org/show_bug.cgi?id=136041
此外,使用前缀属性时,应始终将它们放在未加前缀的版本之前.
.tabs { width: 100%; display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; Box-sizing: border-Box; } .tab { border: 1px solid #3A3A3A; color: #929292; Box-sizing: border-Box; -webkit-flex: 1 1 50%; flex: 1 1 50%; text-align: center; }
<div> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </div>
css3 – 为什么我的div背景渐变不适用于IE9
我正在使用的代码是:
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#388EBB',endColorstr='#5D9ABA')
为了更好地理解,我创建了一个名为leaderboard的div类,它位于屏幕的右上方,位置是固定的.
除此之外,页面中具有渐变的其余元素将被正确呈现.难道我做错了什么?
编辑
这就是我的#respond看起来的样子(绝对正常)
#respond { -moz-Box-shadow: 0 0 1px #CCCCCC; -webkit-Box-shadow: 0 0 1px #CCCCCC; border-top: 1px solid #ECEDE8; float: left; margin-left: 10px; width: 370px; margin-bottom: 15px; background: -moz-linear-gradient(center bottom,#E8E8E8 0%,#F2F2F1 50%) repeat scroll 0 0 #F5F5F4; background: -webkit-gradient(linear,left top,left bottom,from(#E8E8E8),to(#f2F2F1)); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#E8E8E8',endColorstr='#F2F2F1'); /* for IE */ -ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#E8E8E8',endColorstr='#F2F2F1'); /* for IE */ }
这就是.leaderboard的样子
.leaderboard { border: 1px solid #5D9ABA; -moz-border-radius: 0px 0px 4px 4px; -webkit-border-radius: 0px 0px 4px 4px; border-radius: 0px 0px 4px 4px; margin: 375px auto; background: -moz-linear-gradient(center bottom,#388EBB 0%,#5D9ABA 50%) repeat scroll 0 0 #5D9ABA; background: -webkit-gradient(linear,from(#388EBB),to(#5D9ABA)); filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1,endColorstr='#5D9ABA'); /* for IE */ -ms-filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1,endColorstr='#5D9ABA'); /* for IE */ text-color: #EFEFEF; -moz-Box-shadow: -2px 2px 5px 0px #CCCCCC; -webkit-Box-shadow: -2px 2px 5px 0px #CCCCCC; Box-shadow: -2px 2px 5px 0px #CCCCCC; }
解决方法
HTML
<ahref="#">Anchor</a> <div>Div</div>
CSS
a { display:inline-block; /* NB ie7 ele requires display:block or display:inline-block for gradient to work on anchors */ } a,div { min-height:1%; /* NB ie7 ele requires haslayout for gradient to work */ } .gradient{ background: #f8cbd6; /* Old browsers */ background: -moz-linear-gradient(top,#f8cbd6 0%,#edeeec 100%); /* FF3.6+ */ background: -webkit-gradient(linear,color-stop(0%,#f8cbd6),color-stop(100%,#edeeec)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top,#edeeec 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top,#edeeec 100%); /* Opera11.10+ */ /* background: -ms-linear-gradient(top,#edeeec 100%); IE10+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f8cbd6',endColorstr='#edeeec',GradientType=0 ); /* IE6-9 */ background: linear-gradient(top,#edeeec 100%); /* W3C */ } /* NOSUPPORT ie7-9 for gradient AND border-radius (border-radius only supported in ie9 anyway) */
PS如果你的目标是在IE7-9中结合边界半径,渐变和多个背景图像(在2011年8月3日的最新版本中),祝你好运,我只能花5个小时进行实验和记录使用案件!).
我即将公布我的调查结果 – 这不属于这个问题的范围 – 但是如果有人在阅读这个问题需要他们给我发一个DM /电子邮件(mail@ldexterldesign.co.uk).
最好,
今天关于CSS 径向渐变不适用于 Safari 中的按钮和径向渐变html的分享就到这里,希望大家有所收获,若想了解更多关于Angular 4动画不适用于Safari iOS 9.3、Angular2应用程序适用于Chrome和IE,但不适用于Firefox或Safari、CSS3 – Flex包装不适用于IOS 10.1.1 Safari和Chrome、css3 – 为什么我的div背景渐变不适用于IE9等相关知识,可以在本站进行查询。
本文标签: