Support for scroll bar styling in Edge Browser

2019-08-10 02:25发布

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?

1条回答
劳资没心,怎么记你
2楼-- · 2019-08-10 03:19

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

查看更多
登录 后发表回答