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

标签 html css font-awesome

下面是代码。我试图让悬停在 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/

相关文章:

javascript - 删除所有 cookie 并在一定时间间隔后重定向到 html 页面

javascript - 更改下拉菜单中复选框的位置

html - 如何更改 col-sm (bootstrap) 父元素背景色

html - 从 CSS 中的 ul li 元素中删除红色边框

css - 如何更改图库中元素的颜色

css - Font-Awesome 中没有标尺图标

html - 在图像( map )上自定义绝对定位的 FontAwesome 标记

html - 如何从网页中删除页脚? (更新 : Not footer. .. 但 divs 创建的行)

html - 导航栏周围奇怪的橙色边框

reactjs - 如何将 FontAwesome 5 Pro 与 React 集成?