氦气硬盘 螺丝孔对不上
One thing I can't stand is extra code. Whether it's an extra CSS or JavaScript file that's been included by the page, bloated HTML, or unoptimized images, we're making our millions of of desktop and mobile visitors pay for our laziness and mistakes. A great tool called Helium is available to help developers detect selectors in their stylesheets that are unmatched or malformed. Let me show you how it works!
我无法忍受的一件事是额外的代码。 无论页面中包含了额外CSS或JavaScript文件,HTML肿HTML还是未经优化的图像,我们都在让数百万的桌面和移动访问者为我们的懒惰和错误付出代价。 有一个很棒的工具叫做Helium ,可以帮助开发人员在样式表中检测出不匹配或格式错误的选择器。 让我告诉你它是如何工作的!
Get Helium 获取氦气Start by including the script in your page and initializing Helium upon load:
首先在页面中包含脚本,并在加载时初始化Helium:
<script type="text/javascript" src="js/lib/helium-css/helium.js" onload="helium.init()" async></script>As soon as the page is loaded, the developer is presented with a textarea with which they may type page URLs to test. These pages are then loaded and a report is generated, detailing the unused selectors, malformed selectors, and pseudo-selectors which should be tested manually:
页面加载后,开发人员将看到一个文本区域,他们可以使用该文本区域键入要测试的页面URL。 然后加载这些页面并生成报告,详细说明应手动测试的未使用的选择器,格式错误的选择器和伪选择器:
Get Helium 获取氦气Helium is an excellent tool for identifying legacy and unnecessary CSS. The information provided by Helium allows developers to remove unused CSS or better segment site CSS. This tool is the perfect utility for developers looking to quickly optimize their CSS code. In fact, I've not seen a tool so easy to implement and use. Let me know if you agree!
氦气是识别遗留和不必要CSS的绝佳工具。 Helium提供的信息使开发人员可以删除未使用CSS或更好的细分站点CSS。 对于希望快速优化其CSS代码的开发人员而言,此工具是理想的实用工具。 实际上,我还没有看到如此容易实现和使用的工具。 如果您同意,请告诉我!
翻译自: https://davidwalsh.name/detect-unmatched-css-selectors
氦气硬盘 螺丝孔对不上
相关资源:连续波DF/HF化学激光器收缩段氦气膜注入式新型喷管的理论研究