简体   繁体   English

如何在firefox中使用jqmath进行删除线程

[英]how to make a strikethrough in jqmath in firefox

Chrome on Left, Firefox on Right Chrome左侧,Firefox右侧

We're using jqmath and would like to use the line-through text-decoration, as described here: How does one indicate strikethrough in jqmath? 我们正在使用jqmath,并希望使用直通文本修饰,如下所述: 如何在jqmath中指示删除线?

This works in Chrome, but is not working in Firefox. 这适用于Chrome,但在Firefox中不起作用。

.deletedText {
    color: red;
    text-decoration: line-through;
}

...Neither of these will produce a line-through in FireFox (but both work in Chrome) ...这些都不会在FireFox中产生直通(但两者都可以在Chrome中运行)

<li>$ \cl "deletedText"{ax^2+bx+c=0}$</li>
<li class="deletedText">$ax^2+bx+c=0$</li>

Any assistance is appreciated. 任何帮助表示赞赏。

This is an issue with native MathML in Firefox. 这是Firefox中的原生MathML的问题。 Firefox and Safari actually implement (large parts of) MathML, but the implementations don't always respect all CSS properties. Firefox和Safari实际上实现了(大部分)MathML,但实现并不总是尊重所有CSS属性。 This example works in Safari 10, for example, but I don't know if it will continue to work in Safari in the future. 例如,此示例适用于Safari 10,但我不知道它将来是否会继续在Safari中运行。 You could file a bug at mozilla. 你可以在mozilla上提交一个bug。 One problem is that MathML is not being actively worked on by the browser vendors (I am hoping this will change as schools get more computers, but I've been hoping for years/decades, sigh), and another problem is that the MathML spec was developed for non-CSS and pre-CSS (!) environments, and some might argue the spec doesn't explicitly state that all CSS properties must be implemented/respected. 一个问题是,MathML没有被浏览器供应商积极处理(我希望这会随着学校获得更多计算机而改变,但我一直希望数年/数十年,感叹),另一个问题是MathML规范是为非CSS和pre-CSS(!)环境开发的,有些人可能认为规范没有明确声明必须实现/遵守所有CSS属性。

If strikethrough is a requirement for you, then in the short-term you can turn off native (browser) MathML in javascript: 如果删除线是您的要求,那么在短期内您可以在javascript中关闭本机(浏览器)MathML:

M.MathML=false;

Do this in a <script> that's after the <script src="..."> tag that you use to load jqmath. 在用于加载jqmath的<script src="...">标记之后的<script>中执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM