bootstrap.css.map这个文件有何用处?该怎能使用它?

.
├── bootstrap.css
├── bootstrap.css.map
├── bootstrap.min.css
├── bootstrap-theme.css
├── bootstrap-theme.css.map
└── bootstrap-theme.min.css

0 directories, 6 files

在下载最新的bootstrap后,发现*.map后缀结束的文件,这个文件有何意义?为什么会产生这种文件,我该怎么用起来?

阅读 51.4k
2 个回答

对于js的map是为了对应到压缩前的代码,比如那些a,b之类的
但是,对于css.map
是和css预处理器相关的

Many developers generate CSS style sheets using a CSS preprocessor, such as Sass, Less, or Stylus. Because the CSS files are generated, editing the CSS files directly is not as helpful.
For preprocessors that support CSS source maps, DevTools lets you live-edit your preprocessor source files in the Sources panel, and view the results without having to leave DevTools or refresh the page. When you inspect an element whose styles are provided by a generated CSS file, the Elements panel displays a link to the original source file, not the generated .css file.

详细内容见:
https://developer.chrome.com/devtools/docs/css-preprocessors

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题