【发布时间】:2022-02-08 12:37:12
【问题描述】:
我对 HTML 比较陌生,在使用 display: flex 后遇到了这个错误。 我的按钮可点击区域在实际按钮上方约 10px 处,当我使用检查元素时,按钮高亮显示其在可见按钮的上方。
<body>
<h1 id="HomepageTitle" style="display: flex; justify-content: center; font-family: sans-serif; color: black;">CoderTom</h1>
<h2 id="HomepageHeader" style="display: flex; justify-content: center; font-family: sans-serif; color: blue;">Home</h3>
<div class="button-group" style="display: flex; justify-content: center;">
<a href="contactpage.html"><button style="position : relative; top: 50px; background-color: rgb(0, 255, 55); font-family: sans-serif; font-weight: 700; color: black; width: 100%; height: 100%;">Contact</button></a>
</div>
<script src="application.js"></script>
</body>
【问题讨论】:
-
你能把它贴在密码箱里吗?另外请附上你得到的图片。
标签: javascript html web