浏览器调试技巧
1、前端样式 debug 专用的,浏览器执行,给所有元素加个 outline,不影响布局,给页面照个 X 光。
1 javascript: (function () { 2 const style = document.getElementById('outlineStyle'); 3 if (style) { 4 style.parentNode.removeChild(style); 5 } 6 else { 7 const style = document.createElement('style'); 8 style.innerText = '* {outline: 1px solid red !important}'; 9 style.id = 'outlineStyle'; 10 document.head.appendChild(style); 11 } 12 })();
2、可编辑页面。
document.designMode = "on";
                    
                
                
            
        
浙公网安备 33010602011771号