首页 > 解决方案 > 无法点击 Href 链接

问题描述

我在我的网站上发现了一个问题,我无法单击 href 链接。

在我的离线测试中,它可以工作,但是当我上传到主机时,链接将不起作用。我在我的网站上包含了 html 和 css 编码。

这是我的CSS:

.footer-social-icon > a > i {
background:  #2e93fa;
font-size: 14px;
color: #ffffff;
height: 40px;
width: 40px;
line-height: 40px;
font-weight: 500;
border-radius: 10px 10px 10px 0px;
margin-right: 10px;}

这是我的 HTML:

<div class="footer-social-icon">
        <a href="https://www.facebook.com/myavinofficial/"><i class="fa fa-facebook" aria-hidden="true"></i></a>
        <a href="#"><i class="fa fa-twitter" aria-hidden="true"></i></a>
        <a href="https://instagram.com/myavinofficial?igshid=mt79av9pihaq"> <i class="fa fa-instagram" aria-hidden="true"></i></a>
        <a href="https://www.youtube.com/channel/UCNtsL7TC0JfTiIjngA8dY9g"><i class="fa fa-youtube" aria-hidden="true"></i></a>
        <a href="https://api.whatsapp.com/send?phone=6289631925737&text=Halo%2C%20MyAVin!%20Ada%20yang%20ingin%20saya%20tanyakan%20nih."><i class="fa fa-whatsapp" aria-hidden="true"></i></a>
    </div>

请帮助我。谢谢

标签: phphtmlcss

解决方案


该代码对我有用。也许您忘记添加 font-awesome 库。如果您没有链接,则无法显示任何信息。

<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font- 
awesome.min.css" rel="stylesheet" integrity="sha384- 
wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" 
crossorigin="anonymous">

尝试将其添加到 html 文件的头部


推荐阅读