我是新来的网站开发,我现在正在学习CSS。我有这个问题,根据背景为其他2个图标已经加载,但第二个没有。
.bg-instagram {
padding: 7px 10px;
border-radius: 50%;
width: 100%;
height: 100%;
background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.bg-whatsapp {
padding: 7px 10px;
border-radius: 50%;
width: 100%;
height: 100%;
background: green;
}
.bg-facebook {
padding: 7px 13px;
border-radius: 50%;
width: 100%;
height: 100%;
background: #3b5998;
}<div class="container shadow rounded-pill bg-white py-5">
<p>
<a class="fa-icon mx-4" href="#" title="">
<i class="fa fa-instagram fa-2x text-white bg-instagram"></i>
</a>
<a class="fa-icon mx-4" href="#" title="">
<i class="fa fa-whatsapp fa-2x text-dark bg-whatsapp"></i>
</a>
<a class="fa-icon mx-4" href="#" title="">
<i class="fa fa-facebook fa-2x text-white bg-facebook"></i>
</a>
</p>
</div>
我希望有人能帮我找出我的代码中任何明显的问题。谢谢!
发布于 2020-04-27 04:54:18
对不起,让问题悬而未决,我意识到它没有加载,因为我不得不硬刷新浏览器为它加载css文件!
发布于 2020-04-25 08:39:27
看看这个,字体很棒。我想你忘了用字体很棒的CDN。
没有图标,我在字体中找到了这个名字..fa图标类.
.bg-instagram {
padding: 7px 10px;
border-radius: 50%;
width: 100%;
height: 100%;
background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.bg-whatsapp {
padding: 7px 10px;
border-radius: 50%;
width: 100%;
height: 100%;
background: green;
}
.bg-facebook {
padding: 7px 13px;
border-radius: 50%;
width: 100%;
height: 100%;
background: #3b5998;
}<!DOCTYPE html>
<html>
<head>
<title>Font Awesome Icons</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="container shadow rounded-pill bg-white py-5">
<p>your code</p>
<a class="fa-icon mx-4" href="#" title="">
<i class="fa fa-instagram fa-2x text-white bg-instagram"></i>
</a>
<a class="fa-icon mx-4" href="#" title="">
<i class="fa fa-whatsapp fa-2x text-dark bg-whatsapp"></i>
</a>
<a class="fa-icon mx-4" href="#" title="">
<i class="fa fa-facebook fa-2x text-white bg-facebook"></i>
</a>
<br /><br />
<p>my different code</p>
<i class="fa fa-facebook-official" aria-hidden="true" style="background-color:blue; font-size:40px;"></i>
<i class="fa fa-instagram" aria-hidden="true" style=" background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); font-size:40px;"></i>
<i class="fa fa-whatsapp" aria-hidden="true" style="background-color:green; font-size:40px;"></i>
</div>
</body>
</html>
https://stackoverflow.com/questions/61422106
复制相似问题