.html
文件的末尾添加一个小的<script>
标签。
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<footer class="footer" style="opacity: 0;">My footer </footer>
</body>
</html>
<script>
/* Place this script tag at the end of your document */
document.getElementsByClassName("footer")[0].style.opacity = 1; //sets opacity of footer element to 1
</script>
style
属性,您可以查看这些来自 chrome 和 firefox 的指南,了解如何在开发工具中设置断点。
希望这能有所帮助!