GVKun编程网logo

我的 cshtml 按钮适用于 IE,但不适用于 MS Edge 或 Firefox

15

想了解我的cshtml按钮适用于IE,但不适用于MSEdge或Firefox的新动态吗?本文将为您提供详细的信息,此外,我们还将为您介绍关于@pageCss样式不适用于Mozillafirefox、A

想了解我的 cshtml 按钮适用于 IE,但不适用于 MS Edge 或 Firefox的新动态吗?本文将为您提供详细的信息,此外,我们还将为您介绍关于@page Css样式不适用于Mozilla firefox、Angular2应用程序适用于Chrome和IE,但不适用于Firefox或Safari、CSS @ font-face不适用于Firefox,但适用于Chrome和IE、CSS @font-face 不适用于 Firefox,但适用于 Chrome 和 IE的新知识。

本文目录一览:

我的 cshtml 按钮适用于 IE,但不适用于 MS Edge 或 Firefox

我的 cshtml 按钮适用于 IE,但不适用于 MS Edge 或 Firefox

如何解决我的 cshtml 按钮适用于 IE,但不适用于 MS Edge 或 Firefox?

我最初的定义是

<divtitle="Run Reports" id="updateChartBt" onclick="Overview">Run Reports</div> 

但也尝试过:

<button id="updateChartBt" onselect="Overview">Run Reports</button 
<button type="button" id="updateChartBt" onclick="Overview">Run Reports</button>

所有 3 种都适用于 IE,但 MS Edge 和 Firefox 似乎没有收到我的点击事件。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

@page Css样式不适用于Mozilla firefox

@page Css样式不适用于Mozilla firefox

我的要求是在打印时为所有页面提供10厘米的边距.

我正在使用window.print()打印.我的网页会动态增加(因此无法确定页数).对于我需要提供10厘米边距的所有页面.

我使用CSS Media =“Print”,我在其中定义了样式:

@page
  {
     Margin-top :10cm; 
  }

这适用于除Mozilla Firefox之外的所有浏览器.我搜索了解决方案并且所有博客都说,Mozilla不会支持@page,但是没有解决方案.有人可以帮我吗?
请让我知道是否可以在mozilla中实现

解决方法

对不起,我知道你的问题很老了,但它出现在谷歌查询我遇到同样的问题.

根据这个链接(https://developer.mozilla.org/en-US/docs/Web/CSS/@page)它自19.0以来在Firefox中得到支持,这是在你的帖子之后,仅仅是为了完整性……

Angular2应用程序适用于Chrome和IE,但不适用于Firefox或Safari

Angular2应用程序适用于Chrome和IE,但不适用于Firefox或Safari

应用程序在Chrome和IE(11)中运行良好,但在Firefox(42.0)或Safari(5.1.7)中无效.

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”有关.

通过升级es6-shim来解决问题.

CSS @ font-face不适用于Firefox,但适用于Chrome和IE

CSS @ font-face不适用于Firefox,但适用于Chrome和IE

以下代码可在Google Chrome beta和IE
7中运行。但是,Firefox似乎对此有问题。我怀疑这是我的CSS文件如何包含的问题,因为我知道Firefox对跨域导入不太友好。

但这仅仅是静态HTML,而没有跨域问题。

在我的landing-page.html上,我像这样进行CSS导入:

<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen,projection" />

在main.css中,我还有另一个导入,例如:

@import url("reset.css");
@import url("style.css");
@import url("type.css");

在type.css中,我有以下声明:

@font-face {
    font-family: "DroidSerif Regular";
        src: url("font/droidserif-regular-webfont.eot");
        src: local("DroidSerif Regular"),url("font/droidserif-regular-webfont.woff") format("woff"),url("font/droidserif-regular-webfont.ttf")     format("truetype"),url("font/droidserif-regular-webfont.svg#webfontpB9xBi8Q")     format("svg"); 
    font-weight: normal; font-style: normal; }
@font-face {
    font-family: "DroidSerif Bold";
    src: url("font/droidserif-bold-webfont.eot");
    src: local("DroidSerif Bold"),url("font/droidserif-bold-webfont.woff") format("woff"),url("font/droidserif-bold-webfont.ttf") format("truetype"),url("font/droidserif-bold-webfont.svg#webfontpB9xBi8Q") format("svg");
    font-weight: normal; font-style: normal; }

body { font-family: "DroidSerif Regular",serif; }
h1 { font-weight: bold; font-family: "DroidSerif Bold",serif; }

我在与type.css相同的位置有一个名为“ font”的目录。该字体目录包含所有woff / ttf / svg文件等。

我对此很困惑。 它适用于Chrome和IE,但不适用于Firefox 。这怎么可能?我想念什么?

CSS @font-face 不适用于 Firefox,但适用于 Chrome 和 IE

CSS @font-face 不适用于 Firefox,但适用于 Chrome 和 IE

以下代码适用于 Google Chrome beta 和 IE 7。但是,Firefox 似乎对此有问题。我怀疑这是如何包含我的 CSS
文件的问题,因为我知道 Firefox 对跨域导入不太友好。

但这只是静态 HTML,不存在跨域问题。

在我的landing-page.html 上,我像这样进行 CSS 导入:

<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen, projection" />

在 main.css 我有另一个像这样的导入:

@import url("reset.css");@import url("style.css");@import url("type.css");

在 type.css 我有以下声明:

@font-face {    font-family: "DroidSerif Regular";        src: url("font/droidserif-regular-webfont.eot");        src: local("DroidSerif Regular"),                 url("font/droidserif-regular-webfont.woff") format("woff"),                 url("font/droidserif-regular-webfont.ttf")     format("truetype"),                 url("font/droidserif-regular-webfont.svg#webfontpB9xBi8Q")     format("svg");     font-weight: normal; font-style: normal; }@font-face {    font-family: "DroidSerif Bold";    src: url("font/droidserif-bold-webfont.eot");    src: local("DroidSerif Bold"),         url("font/droidserif-bold-webfont.woff") format("woff"),         url("font/droidserif-bold-webfont.ttf") format("truetype"),         url("font/droidserif-bold-webfont.svg#webfontpB9xBi8Q") format("svg");    font-weight: normal; font-style: normal; }body { font-family: "DroidSerif Regular", serif; }h1 { font-weight: bold; font-family: "DroidSerif Bold", serif; }

我在 type.css 所在的位置有一个名为“font”的目录。此字体目录包含所有 woff/ttf/svg 文件等。

我被这个难住了。 它适用于 Chrome 和 IE,但不适用于 Firefox 。这怎么可能?我错过了什么?

答案1

小编典典

本地运营网站 ( file:///)

file:///默认情况下,about:configFirefox带有非常严格的“文件 uri 来源” fileuri

security.fileuri.strict_origin_policy

将其设置为 false ,您应该能够跨不同路径级别加载本地字体资源。

出版网站

根据我在下面的评论,并且您在部署站点后遇到此问题,您可以尝试添加一个额外的标头以查看您的问题是否将自身配置为跨域问题:它不应该,因为您正在指定相对路径,但无论如何我都会尝试一下:在您的
.htaccess 文件中,指定您要为每个请求的 .ttf/.otf/.eot 文件发送一个额外的标头:

<FilesMatch "\.(ttf|otf|eot)$">    <IfModule mod_headers.c>        Header set Access-Control-Allow-Origin "*"    </IfModule></FilesMatch>

坦率地说,我不希望它有任何区别,但它是如此简单,值得一试:否则尝试对你的字体字体使用 base64 编码,虽然丑陋但它也可能有效。

这里有一个很好的回顾

我们今天的关于我的 cshtml 按钮适用于 IE,但不适用于 MS Edge 或 Firefox的分享已经告一段落,感谢您的关注,如果您想了解更多关于@page Css样式不适用于Mozilla firefox、Angular2应用程序适用于Chrome和IE,但不适用于Firefox或Safari、CSS @ font-face不适用于Firefox,但适用于Chrome和IE、CSS @font-face 不适用于 Firefox,但适用于 Chrome 和 IE的相关信息,请在本站查询。

本文标签: