无法获取我的<a> tags to work in GitHub webpage (but works fine on Codepen)

时间:2019-03-25 20:29:19

标签: html github hyperlink tags codepen

I created a random quote generater webpage as part of the freecodecamp curriculum and am now uploading the files to github so that they can be hosted on there as their own webpages. The page works fine in codepen but the 'buttons' don't work when I upload the page to github. I can't figure out why. I would appreciate any feedback and insight on this issue! (I'm quite new to web development and coding in general so I apologize in advance if this is a stupid/simple error) Thanks!

I'm also not sure why the font size is so small on the github version :/

page on codepen - https://codepen.io/armte312/pen/Qrvyjr

github网页-https://armte.github.io/quotegen.github.io/

github存储库-https://github.com/armte/quotegen.github.io

有问题的代码:

<div class="button-row" id="button-row">
                <a class="button tweet-quote" href="#" id="tweet-quote"><i class="fab fa-twitter-square"></i></a>
                <a class="button new-quote-btn" href="#" id="new-quote-btn">New Quote</a>
            </div><!--End of button-row !-->

我尝试使用z-index属性,因为我不确定其他元素是否可能在a标签的“前面”,但这似乎没有用。 还尝试了引导程序的更新版本,但这似乎也没有关系。

“新引号”按钮(一个标记)应该对悬停在其上方的光标以及单击鼠标时作出反应,但两者均不起作用...

1 个答案:

答案 0 :(得分:1)

您将jquery设置为

<script type="text/javascript" src="jquery-3.3.1.js"></script>

,但是在github存储库中没有该文件的名称。使用此代码代替

<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.js"></script>

删除重复项

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!DOCTYPE html>
<html lang="en">