网址: http://leeiio.me
PR:
Alexa: 2,539,354
备案号:
服务器IP: 209.141.46.241 美国 加利福尼亚州弗里蒙特市Buyvm公司
描述: 蜗牛君。瓜牛(guāniú)君。少年壮志不言愁。Front-end Engineer,Designer,Mac & iOS user and lover.Web developer leade
详细介绍
Leeiio Chaos Made.
The world is golden.
HomeAbout搜索结果Archive
ArticlesiMessage 显示「尚未送达」但是对方已经收到信息?
To fix this issue, open iMessage on you Mac and then click “Preferences – Accounts – Accounts Details… – Sign Out – Sign In again”. If it still not work,sign out all of iMessages on your devices.
iMessage
Posted in Life | 生活
@ 3 years, 3 months ago
|
11 Comments
Articles歌に形はないけれど ピアノver.
ありがとう!私はこのギフトを好む!
birthday Music
Posted in Life | 生活
@ 3 years, 4 months ago
|
2 Comments
Quotes为什么 CSS 选择器是从右往左的?
为什么排版引擎解析 CSS 选择器时一定要从右往左解析?
Keep in mind that when a browser is doing selector matching it has one element (the one it's trying to determine style for) and all your rules and their selectors and it needs to find which rules match the element. This is different from the usual jQuery thing, say, where you only have one selector and you need to find all the elements that match that selector.
If you only had one selector and only one element to compare against that selector, then left-to-right makes more sense in some cases. But that's decidedly not the browser's situation. The browser is trying to render Gmail or whatever and has the one it's trying to style and the 10,000+ rules Gmail puts in its stylesheet (I'm not making that number up).
In particular, in the situation the browser is looking at most of the selectors it's considering don't match the element in question. So the problem becomes one of deciding that a selector doesn't match as fast as possible; if that requires a bit of extra work in the cases that do match you still win due to all the work you save in the cases that don't match.
If you start by just matching the rightmost part of the selector against your element, then chances are it won't match and you're done. If it does match, you have to do more work, but only proportional to your tree depth, which is not that big in most cases.
On the other hand, if you start by matching the leftmost part of the selector... what do you match it against? You have to start walking the DOM, looking for nodes that might match it. Just discovering that there's nothing matching that leftmost part might take a while.
So browsers match from the right; it gives an obvious starting point and lets you get rid of most of the candidate selectors very quickly. You can see some data at http://groups.google.com/group/mozilla.dev.tech.layout/browse_thread/thread/b185e455a0b3562a/7db34de545c17665 (though the notation is confusing), but the upshot is that for Gmail in particular two years ago, for 70% of the (rule, element) pairs you could decide that the rule does not match after just examining the tag/class/id parts of the rightmost selector for the rule. The corresponding number for Mozilla's pageload performance test suite was 72%. So it's really worth trying to get rid of those 2/3 of all rules as fast as you can and then only worry about matching the remainin
猜你喜欢
- Not Found - 电脑网络 > 网址黄页
- kzlyp.com - 电脑网络 > 网址黄页
- 厨房用品_酒店厨房用品_厨 - 电脑网络 > 网址黄页
- 移动创意生活 - 电脑网络 > 网址黄页
- 1dl.us :: You - 电脑网络 > 网址黄页
- FROYO's - 电脑网络 > 网址黄页
- 闪游浏览器 - 魔方浏览器 - 电脑网络 > 网址黄页
- 首页 - 电脑网络 > 网址黄页
- SEO博客 - 研究SEO - 电脑网络 > 网址黄页
- Maxthon Addon - 电脑网络 > 网址黄页
- Flavors.me : - 电脑网络 > 网址黄页
- 百度开放服务平台 - 电脑网络 > 网址黄页
- ET.cm - Power - 电脑网络 > 网址黄页
- ET.cm - Power - 电脑网络 > 网址黄页
- 优博信息网_关注互联网的发 - 电脑网络 > 网址黄页
- Endpoint, Clo - 电脑网络 > 网址黄页
- This website - 电脑网络 > 网址黄页
- 右下角有藏宝图。 - 电脑网络 > 网址黄页
- 彼得导航_上网从这里开始 - 电脑网络 > 网址黄页
- airsina.net - 电脑网络 > 网址黄页