以下是代码。我试着在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>
执行此操作的
答案 0 :(得分:0)
此处您只添加了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>
答案 1 :(得分:0)