最近面了一个前端,感觉很满意,分享给大家
B 站链接: https://www.bilibili.com/video/BV18f4y1B7xh/
B 站链接: https://www.bilibili.com/video/BV18f4y1B7xh/
比如给一个你没有接触过的功能或算法, 让你在限定的时间内通过 google 查找资料把功能做出来。
The /* */ comment syntax is used for both single and multiline comments. There is no other way to specify comments in external style sheets. However, when using the <style> element, you may use <!– –> to hide CSS from older browsers, although this is not recommended. As with most programming languages that use the /* */ comment syntax, comments cannot be nested. In other words, the first instance of */ that follows an instance of /* closes the comment.
面试内容明显就是按剧本演的啊,而且都是适配他那个在线工具出的,特别简单
4.1.9 Comments
Comments begin with the characters “/*” and end with the characters “*/”. They may occur anywhere outside other tokens, and their contents have no influence on the rendering. Comments may not be nested.
CSS also allows the SGML comment delimiters (“<!–” and “–>”) in certain places defined by the grammar, but they do not delimit CSS comments. They are permitted so that style rules appearing in an HTML source document (in the STYLE element) may be hidden from pre-HTML 3.2 user agents. See the HTML 4 specification ([HTML4]) for more information.
https://www.w3.org/TR/CSS21/syndata.html#comments
https://drafts.csswg.org/css-syntax-3/#consume-comment
1. 你知道 css 注释这么写会发生什么事吗?
2. 如果我们就是想用行内注释,该怎么办?
这里往下走其实就到了 css hack 与 css 预编译器环节了。无意中使用的行内注释,看起来好像起了作用,但是实际上已经成为了 hack,浏览器能不能解析,怎么解析,完全看各自实现。
IDE 当然可以解决很多问题,但是按照 4 年经验的职业前端开发来说,我觉得这点基础应该是要有的。
哦,广告来的,打扰了。