Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevTools #3

Open
hex11o opened this issue Jul 14, 2020 · 4 comments
Open

DevTools #3

hex11o opened this issue Jul 14, 2020 · 4 comments

Comments

@hex11o
Copy link
Owner

hex11o commented Jul 14, 2020

通过coverage查看未使用的css

  1. ctrl + shift + p(win), cmd + shift + p(mac)打开命令行;
  2. 输入coverage选择Show Coverage打开标签;
  3. 点击标签重载查看资源使用情况。
@hex11o
Copy link
Owner Author

hex11o commented Jul 14, 2020

动态调整颜色,shadow

  1. 审查元素样式右下角hover可看到添加text-、box-shadow, color/background-color.
  2. 支持吸管,复制RGB功能。

@hex11o
Copy link
Owner Author

hex11o commented Jul 14, 2020

console

  1. 将列表打印成表格格式,console.table([{head: 'abc'}, {head: 'efg'}])
  2. 计时器: �console.time(), (){// some code}, console.timeEnd()
  3. $0: 最新的审查元素, $1:上一个审查元素,类推,基本不会用到...
  4. $(selector): alias for document.querySelector()
  5. $$(selector): alias for document.querySelectorAll()

@hex11o
Copy link
Owner Author

hex11o commented Jul 14, 2020

network

  1. 清空缓存重载页面:打开devTools,长按刷新按钮,选择empty cache and hard reload。

@hex11o
Copy link
Owner Author

hex11o commented Jul 17, 2020

performance

  1. 查看页面fps: 打开命令行,输入render, enable fps meter.

@hex11o hex11o changed the title # DevTools DevTools Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant