支持在边缘浏览器中滚动条样式 [英] Support for scroll bar styling in Edge Browser

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

问题描述

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

解决方案

很难知道,没有官方文档清除指示,或来自开发团队的官方词汇,但根据之前关于Edge的目的和设计目标的评论,似乎不太可能。



这里是为什么我说:



您所引用的属性最初已添加到 IE8作为扩展到CSS 2.1规范。这些属性是非标准的,因此在某些圈子中被视为非法。 (还有其他非标准变量



很清楚的是,这些特定的属性可能不会在Edge中正式支持,可能是因为他们是专有扩展。



这似乎不太可能改变,因为MS Edge的主要设计点之一是为了支持标准和跨平台互操作性而搁置传统兼容性。 (并且,由于主要功能更改在不改变主版本或次版本号的情况下对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

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆