gpt4 book ai didi

html - Font Awesome ......悬停不工作为什么?

转载 作者:行者123 更新时间:2023-11-28 12:51:32 25 4
gpt4 key购买 nike

下面是代码。我试图让悬停在 Font-awesome 中工作。但它没有!请帮助..

<!DOCTYPE html>
<html>
<head>
<link href="//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" rel="stylesheet">
<meta charset=utf-8 />
<title>JS Bin</title>
<style>
.icon-facebook-sign:before {color:lightblue;}
.icon-facebook-sign:hover{color:red;}
.icon-twitter-sign:hover{color:#00BEF6}
.icon-google-plus-sign:hover{color:red;}
</style>
</head>
<body>
<li style="float:left;">
<!-- start social bookmarks -->
<div style="font-size: 32px; color: grey;">
<i class="icon-facebook-sign" style="color:red; margin-left: 0px; :hover{color:lightblue;}">
</li>
<i class="icon-twitter-sign" style="margin-left: -12px;"></i>
<i class="icon-linkedin-sign" style="margin-left: -12px;"></i>
<i class="icon-google-plus-sign" style="margin-left: -12px;"></i>
</div>
<!-- end social bookmarks -->
</li>
</body>
</html>

我执行的是:http://jsbin.com/idicib/3/edit

最佳答案

在这里您只添加了 font-awesome但不是 twitter-bootstrap .将此链接添加到您的代码中并尝试。它会工作<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">

<!DOCTYPE html>
<html>
<head>
<link href="//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<meta charset=utf-8 />
<title>JS Bin</title>
<style>
.icon-facebook-sign:before {color:lightblue;}
.icon-facebook-sign:hover{color:red;}
.icon-twitter-sign:hover{color:#00BEF6}
.icon-google-plus-sign:hover{color:red;}
</style>
</head>
<body>
<li style="float:left;">
<!-- start social bookmarks -->
<div style="font-size: 32px; color: grey;">
<i class="icon-facebook-sign" style="color:red; margin-left: 0px; :hover{color:lightblue;}">
</li>
<i class="icon-twitter-sign" style="margin-left: -12px;"></i>
<i class="icon-linkedin-sign" style="margin-left: -12px;"></i>
<i class="icon-google-plus-sign" style="margin-left: -12px;"></i>
</div>
<!-- end social bookmarks -->
</li>
</body>
</html>

这里是演示:http://jsbin.com/idicib/4/edit

关于html - Font Awesome ......悬停不工作为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16910777/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com