Created
April 29, 2013 06:38
-
-
Save s9011514/5480029 to your computer and use it in GitHub Desktop.
在側邊欄加個浮動Facebook粉絲框
http://sofree.cc/sliding-fb-box/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function() { | |
$(".fbbox").hover(function(){ | |
$(this).stop().animate({right: "0"}, "medium"); | |
}, function(){ | |
$(this).stop().animate({right: "-250"}, "medium"); | |
}, 500); | |
}); | |
</script> | |
<div class="fbbox" style=""> | |
<div> | |
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Ffacebook.com%2Fsofreecc&width=245&colorscheme=light&show_faces=true& connections=9&stream=false&header=false&height=270" scrolling="no" frameborder="0" scrolling="no" style="border: medium none; overflow: hidden; height: 270px; width: 245px;background:#fff;"></iframe> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.fbbox{background: url("http://a.imageshack.us/img525/9882/47256382.png") no-repeat scroll left center transparent !important;display: block;float: right;height: 270px;padding: 0 5px 0 46px;width: 245px;z-index: 99999;position:fixed;right:-250px;top:20%;} | |
.fbbox div{border:none;position:relative;display:block;} | |
.fbbox span{bottom: 12px;font: 8px "lucida grande",tahoma,verdana,arial,sans-serif;position: absolute;right: 6px;text-align: right;z-index: 99999;} | |
.fbbox span a{color: #808080;text-decoration:none;} | |
.fbbox span a:hover{text-decoration:underline;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment