这是我的第一个元素(我不是网络开发人员,这只是一个例子)。 https://codepen.io/Ziratsu/pen/EWyoLN 我已经在我的标题中放置了 anchor ,用于我投资组合的不同部分,但是当我点击它们时它们不起作用.. 我已经输入了正确的“ID”,我不知道为什么这不起作用。
<button class="btn" id="Bouton1" type="button"><a href="#textb">About</a></button>
这是我的 anchor 的引用,具有相同的 ID。
<p id="textb"> Front-End Developer and UX/UI designer,</br> with practical experience in project management, branding strategy,</br> and creative direction; devoted to functional programming and information architecture.</br>Web Developer - User Experience Designer - Graphic Artist</p> </div>
感谢您花时间回复!
最佳答案
尝试使用 anchor 标记而不是按钮:
<a class="btn btn-primary" href="#textb">About</a>
如果您使用 Bootstrap ,您可以使用 btn 类使其看起来像一个按钮,我认为这是因为 btn 类。
关于html - 我的 anchor 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42782434/