检验你的前端基础——Sit the test
前端小学生向大家推荐一个网站:Sit the test。如果你是一名前端工程师或者立志于此,不妨试试此网站上面的测验题。
发现
十几天前,我在奇舞周刊的一篇文章中,发现了一个国外的技能测试网站:Sit the test。测试分为HTML Core,CSS Core,CSS Core(practice)和JavaScript Core四部分,每种测试有25道题,限时30分钟。有了国内大牛的博客推荐,让我对测试题的含金量十分信服,当时我迫于证明自己,马上抽出时间挨着做了一遍:
做完就傻眼了,25题错7道,好像拿捏不准的全错了。题确确实实只是基础题,但是我没仔细看过W3C Standers,凭项目经验以及看过一些进阶书籍硬是把“基础送分题”变成了“附加题”。
分享
让人比较郁闷的是,除了CSS Core(practice),其它三个测试只给出正确率,具体哪道做错了根本不告诉你,更别说正确答案应该是什么了。并且一个星期内只能参加一次测验,真是神奇极了。熟知测试规则后,我把自己做的题全都截图保存了下来,抽空仔细推敲了一遍。下面我抛砖引玉,将一些确定做错的题拿出来分享给大家。(答案放在最后,我无法将所有题的答案分享出来,因为最近我又进行了一遍测试,发现原题,题的顺序以及选项的顺序都会变)
1. Which of the following CSS measurements is the smallest in terms of physical size on a typical desktop display? Assume only default browser styles are in effect.
A:1ex B:1px C:1pt D:1em
2. Your site’s stylesheet contains two rules with exactly the same selector. Which of the following statements correctly describes how this code will apply to a web page?
A:Both rules apply to all matching elements, with the second rule overriding the first.
B:The second rule takes precedence, and the browser ignores the first.
3. Which of the following CSS color codes denotes a color that contains twice as much red as it does blue?
A:#7F0BFE B:#102005 C:#AACC55 D:#221144
4. When you specify a percentage value for margin-top on an element, how is this margin’s actual size calculated?
A:As a percentage of the width of the containing block.
B:As a percentage of the height of the containing block.
5. In a CSS color code such as #f06523.what does it mean if the code is composed of three identical pairs of digits(i.e. #XYXYXY)?
A:the color code will have the same brightness if inverted.
B:the color code represents a web-safe color.
C:the color code represents a shade of gray.
D:the color code has a complementary color with the digits inverted.
6. which of the following best describes the difference between event handlers and event listeners?
A:Event handler are embedded in HTML attributes;the other are assigned in JavaScript code.
B:Event handlers are a nonstandard,proprietarty browser feature;the other are standards-compliant.
C:For a given event type,an element may only have one event handler,but may have multiple event listeners.
D:IE supports event handlers;other browsers support event listeners.
7. Your Web page loads JavaScript code that is run using each of the following techniques:
①:DOMContentLoaded event listener ②:load event listener
③: