【发布时间】:2021-09-28 12:22:47
【问题描述】:
在 VScode IDE 中,两个“减量”按钮未显示并以黄色突出显示。怎么了?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>Increment and Decrement counter</h1>
<div>
<button onclick="increment()">+</button>
<h2 id="counting">h2 tag</h2>
<button onclick="decrement()">-</button>
<button onclick="decrement()">-</button>
<button onclick="decrement()">-</button>
<button onclick="decrement()">-</button>
<button onclick="decrement()">-</button>
</div>
</body>
</html>
【问题讨论】:
-
我在 Stack 中尝试过作为 sn-p 并且没问题。尝试重启 vsCode
-
@Dai OP 的问题是
Why first and third '-' button does not show as a button in html part -
我也试过 vsCode 一切都还好
-
尝试检查检查元素以了解是否应用了 CSS 属性。或者其他一些 CSS 覆盖它