有的小伙伴,比较喜欢文章底部的点赞、分享按钮彩色式样的,马找钱博主也是如此。
在学习了多家知更鸟主题系列的网站后最终实现了,现将代码分享下。
修改后的小伙伴们,有没有效果,请在评论区留言下,也给我和大家个参考。我就不设置回复可见了,谢谢大家!
效果如下图。


- /** 喜欢分享 **/
- #social {
- position: relative;
- margin: 50px auto;
- }
- .social-main {
- position: relative;
- margin: 0 auto;
- width: 243px;
- }
- .social-main span {
- float: left;
- }
- .social-main a {
- color: #999;
- line-height: 36px;
- border-radius: 2px;
- }
- .share-s a, .shang-s a {
- text-align: center;
- }
- .like a {
- float: left;
- padding-left: 15px;
- }
- .social-main a:hover {
- background: #f1f1f1;
- color: #444;
- transition: all 0.2s ease-in 0s;
- }
- .like a {
- background: #fff;
- width: 120px;
- display: block;
- border: 1px solid #ddd;
- }
- .share-s a {
- background: #fff;
- width: 120px;
- display: block;
- padding-left: 15px;
- border: 1px solid #ddd;
- }
- .social-main i {
- color: #999;
- margin: 0 5px 0 0;
- }
- /** 赏 **/
- .shang-empty {
- position: absolute;
- left: 90px;
- top: 0px;
- width: 62px;
- height: 38px;
- overflow: hidden;
- }
- .shang-empty span {
- background: #fff;
- width: 60px;
- height: 60px;
- display: block;
- margin: -10px 0 0 0;
- border-radius: 60px;
- border: 1px solid #ddd;
- }
- .shang-p a {
- position: absolute;
- background: #fff;
- left: 96px;
- top: -5px;
- width: 48px;
- height: 48px;
- font-size: 16px;
- line-height: 45px;
- display: block;
- border: 1px solid #ddd;
- border-radius: 40px;
- left: 101px\9;
- top: 0\9;
- width: 38px\9;
- height: 38px\9;
- line-height: 35px\9;
- }
- .shang-s {
- height: 37px;
- }
- #shang {
- width: 280px;
- display: block;
- }
- .shang-img {
- float: left;
- }
- .shang-img img {
- width: 140px;
- height: auto;
- }
- .shang-main h4 {
- font-size: 15px;
- font-size: 1.5rem;
- text-align: center;
- margin-bottom: 10px;
- }
- .shang-main i {
- color: #ff0000;
- }
- /** 分享 **/
- #share {
- position: absolute;
- top: -60px;
- right: -29px;
- width: 302px;
- height: 68px;
- display: none;
- z-index: 999;
- }
- #share a {
- float: left;
- background: #999;
- font-size: 20px !important;
- color: #fff;
- width: 40px;
- height: 40px;
- line-height: 40px;
- margin-left: 4px;
- padding-left: 0;
- text-align: center;
- border-radius: 3px;
- background: rgba(128, 128, 128, 0.9);
- }
- #share .be-addbox:hover {
- background: #7ab951 !important;
- }
- #share .be-qzone:hover {
- background: #ff7400 !important;
- }
- #share .be-stsina:hover {
- background: #ff0000 !important;
- }
- #share .be-tqq:hover {
- background: #46c0e6 !important;
- }
- #share .be-renren:hover {
- background: #3b68ac !important;
- }
- #share .be-weixin:hover {
- background: #006f1d !important;
- }
- .bd_weixin_popup {
- height: 250px !important;
- }
- .bd_weixin_popup_foot {
- display: none;
- }
将以上代码全部进行替换, 新代码如下:
- /** 喜欢分享 **/
- #social {
- position: relative;
- margin: 50px auto;
- }
- .social-main {
- position: relative;
- margin: 0 auto;
- width: 243px;
- }
- .social-main span {
- float: left;
- }
- .social-main a {
- color: #fff;
- line-height: 36px;
- border-radius: 20px;
- }
- .share-s a, .shang-s a {
- text-align: center;
- }
- .like a {
- float: left;
- padding-left: 20px;
- }
- .social-main a:hover {
- background: #878787;
- color: #fff;
- transition: all 0.2s ease-in 0s;
- }
- .like a {
- background: #f40000;
- width: 120px;
- display: block;
- border: 1px solid #f40000;
- }
- .share-s a {
- background: #dd9933;
- width: 120px;
- display: block;
- padding-left: 15px;
- border: 1px solid #dd9933;
- }
- .social-main i {
- color: #fff;
- margin: 0 5px 0 0;
- }
- .social-main a:hover {
- color: #fff;
- background: #666;
- }
- .like a:hover, .share-s a:hover, .shang-p a:hover {
- border: 1px solid #666;
- }
- /** 赏 **/
- .shang-empty {
- position: absolute;
- left: 90px;
- top: 0px;
- width: 62px;
- height: 38px;
- overflow: hidden;
- }
- .shang-empty span {
- background: #fff;
- width: 60px;
- height: 60px;
- display: block;
- margin: -10px 0 0 0;
- border-radius: 60px;
- border: 1px solid #ddd;
- }
- .shang-p a {
- position: absolute;
- background: #7ab951;
- left: 96px;
- top: -5px;
- width: 48px;
- height: 48px;
- font-size: 16px;
- line-height: 45px;
- display: block;
- border: 1px solid #7ab951;
- border-radius: 40px;
- left: 101px\9;
- top: 0\9;
- width: 38px\9;
- height: 38px\9;
- line-height: 35px\9;
- }
- .shang-s {
- height: 37px;
- }
- #shang {
- width: 280px;
- display: block;
- }
- .shang-img {
- float: left;
- }
- .shang-img img {
- width: 140px;
- height: auto;
- }
- .shang-main h4 {
- font-size: 15px;
- font-size: 1.5rem;
- text-align: center;
- margin-bottom: 10px;
- }
- .shang-main i {
- color: #ff0000;
- }
- /** 分享 **/
- #share {
- position: absolute;
- top: -60px;
- right: -29px;
- width: 302px;
- height: 68px;
- display: none;
- z-index: 999;
- }
- #share a {
- float: left;
- background: #999;
- font-size: 20px !important;
- color: #fff;
- width: 40px;
- height: 40px;
- line-height: 40px;
- margin-left: 4px;
- padding-left: 0;
- text-align: center;
- border-radius: 20px;
- background: rgba(128, 128, 128, 0.9);
- }
- #share .be-addbox {
- color: #7ab951;
- border: 1px solid #7ab951;
- background: #fff;
- }
- #share .be-addbox:hover {
- background: #7ab951 !important;
- color: #fff !important;
- }
- #share .be-qzone {
- color: #ff7400;
- border: 1px solid #ff7400;
- background: #fff;
- }
- #share .be-qzone:hover {
- background: #ff7400 !important;
- color: #fff !important;
- }
- #share .be-stsina {
- color: red;
- border: 1px solid red;
- background: #fff;
- }
- #share .be-stsina:hover {
- background: #ff0000 !important;
- color: #fff !important;
- }
- #share .be-tqq {
- color: #46c0e6;
- border: 1px solid #46c0e6;
- background: #fff;
- }
- #share .be-tqq:hover {
- background: #46c0e6 !important;
- color: #fff !important;
- }
- #share .be-renren {
- color: #3b68ac;
- border: 1px solid #3b68ac;
- background: #fff;
- }
- #share .be-renren:hover {
- background: #3b68ac !important;
- color: #fff !important;
- }
- #share .be-weixin {
- color: #006f1d;
- border: 1px solid #006f1d;
- background: #fff;
- }
- #share .be-weixin:hover {
- background: #006f1d !important;
- color: #fff !important;
- }
- .bd_weixin_popup {
- height: 250px !important;
- }
- .bd_weixin_popup_foot {
- display: none;
- }
替换完成,即可实现你想要的效果!颜色可以根据自己喜好自行调节。
网络营销教程版权声明:
1、本站所发布的一切学习教程、软件等仅限用于学习体验和研究目的,请自觉下载后24小时内删除。
2、严禁用于其他用途,如果你喜欢教程,请支持正版教程软件,得到更好的正版服务。
3、本站内容全部来自网络,版权争议与本站无关,如果您认为侵犯了您的合法权益,请联系我们删除。
4、对于不当转载或引用本网站内容而引起的民事纷争、行政处理或其他损失,本网站不承担责任。
5、对不遵守本声明或其他违法、恶意使用本网站内容者,本网站保留追究其法律责任的权利。
1、本站所发布的一切学习教程、软件等仅限用于学习体验和研究目的,请自觉下载后24小时内删除。
2、严禁用于其他用途,如果你喜欢教程,请支持正版教程软件,得到更好的正版服务。
3、本站内容全部来自网络,版权争议与本站无关,如果您认为侵犯了您的合法权益,请联系我们删除。
4、对于不当转载或引用本网站内容而引起的民事纷争、行政处理或其他损失,本网站不承担责任。
5、对不遵守本声明或其他违法、恶意使用本网站内容者,本网站保留追究其法律责任的权利。