比如:
<style type="text/css> span.box { <!-- position: fixed; --> // 注释就成这鬼样子 } </style>
另外注释 html 文件中的<script>也会出错(错误的使用了 html 的注释)</p> <p>需要怎么样 hack ?</p> </script>
![]() | 1 dorentus 2019-01-17 14:28:08 +08:00 <style type="text/css> 少了一个 " |
![]() | 3 jiejiss 2019-01-17 18:34:08 +08:00 via Android 你需要多装几个扩展( HTML+CSS+JS 之类的),同时建议检查更新,实在不行就提 issue |
![]() | 4 fengyj 2019-01-17 18:57:33 +08:00 via Android 一楼正解。 还有实在不行 style 就别设置 type 值。 |
5 zealinux OP 发现这是个已知的 vscode 问题 [HTML comment inside a script tag in HTML Issue #59313 Microsoft/vscode]( https://github.com/Microsoft/vscode/issues/59313) [[html] problems with html style comments in embedded code Issue #47448 Microsoft/vscode]( https://github.com/Microsoft/vscode/issues/47448) 官方一直还没有解决 |