本文介绍了支持在边缘浏览器中滚动条样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看起来您可以通过IE 11使用IE特定的滚动条样式,例如scrollbar-face-color,scrollbar-track-color等,但不能使用Edge。

解决方案

很难知道,没有,,或,但根据之前关于Edge的目的和设计目标的评论,似乎不太可能。



这里是为什么我说:



您所引用的属性最初已添加到到CSS 2.1规范。这些属性是非标准的,因此在某些圈子中被视为。 (还有其他在不改变主版本或次版本号的情况下对IE11进行修改,对于非标准属性的支持可以在任何给定更新之后消失是完全可行的。)



属性在您使用的构建中工作可能是一个故意的设计决策,或者它可能是一个副作用,Edge基于Trident引擎的一个分支,其中已经删除了许多行的旧代码。 p>

再次,没有官方确认或公告,这是所有的猜测,基于经验和以前的团队行为。你的旅费可能会改变。



希望这有助于...



- Lance


It looks like you can use the IE-specific scrollbar styles like: scrollbar-face-color, scrollbar-track-color, etc. through IE 11, but not with Edge. Is there an alternative for Edge?

解决方案

It's hard to know specifically, without official documentation, clear indications, or official word from the dev team, but it seems unlikely based on previous comments about the purpose and design goals of Edge.

Here's why I say that:

The properties you're referring to were originally added to IE8 as extensions to the CSS 2.1 specification. These properties are non-standard and considered illegal in some circles. (There are other non-standard variations, though it's unclear whether they're supported in MS Edge.)

What is clear is that these particular properties may not be formally supported in Edge, presumably because they are proprietary extensions.

This seems unlikely to change, since one of the major design points of MS Edge is to set aside legacy compatibility in favor of standards and cross platform interoperability. (And, given that major functionality changes were made to IE11 without changing the major or minor version number, it's entirely feasible that support for non-standard properties may disappear after any given update.)

The fact that these properties work in the build you're using may be a deliberate design decision or it may be a side effect from the fact that Edge is based on a fork of the Trident engine, one where many lines of legacy code have been removed.

Again, without official confirmation or announcement, this is all speculation based on experience and previous team behavior. Your mileage may vary.

Hope this helps...

-- Lance

这篇关于支持在边缘浏览器中滚动条样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-16 22:42
查看更多