源码网,源码论坛,源码之家,商业源码,游戏源码下载,discuz插件,棋牌源码下载,精品源码论坛

 找回密码
 立即注册
楼主: ttx9n

[CSS] 纯css3(无图片/js)制作的几个社交媒体网站的图标

[复制链接]

7万

主题

861

回帖

32万

积分

论坛元老

Rank: 8Rank: 8

积分
329525
发表于 2013-3-21 16:01:32 | 显示全部楼层 |阅读模式
社交媒体的图标听起来就有点意思,在没有图片和javascirpt的参与css3配合html也可以实现,不相信的朋友可以参考下哈,希望可以帮助到你

用纯css3和html来制作一些社交媒体的图标,虽然没有图片和javascirpt,css3配合 html也能实现这些图标。

html代码如下:

复制代码代码如下:
<div class="content">
<ul>
<li class="facebook"><a href="#non" title="Share on Facebook">Facebook</a></li>
<li class="twitter"><a href="#non" title="Share on Twitter">Twitter</a></li>
<li class="rss"><a href="#non" title="Subscribe to the RSS feed">RSS</a></li>
<li class="flickr"><a href="#non" title="Share on Flickr">Flickr</a></li>
<li class="delicious"><a href="#non" title="Bookmark on Delicious">Delicious</a></li>
<li class="linkedin"><a href="#non" title="Share on LinkedIn">LinkedIn</a></li>
<li class="google"><a href="#non" title="Bookmark with Google">Google</a></li>
<li class="orkut"><a href="#non" title="Share on Orkut">Orkut</a></li>
<li class="technorati"><a href="#non" title="Add to Technorati">Technorati</a></li>
<li class="netvibes"><a href="#non" title="Add to NetVibes">NetVibes</a></li>
</ul>
</div>

css代码如下:

复制代码代码如下:
body {
padding:0;
margin:0;
font:1em/1.4 Cambria, Georgia, sans-serif;
color:#333;
background:#fff;
}
ul {
list-style:none;
padding:0;
margin:0;
overflow:hidden;
font:0.875em/1 Arial, sans-serif;
}
ul li {
float:left;
width:66px;
height:66px;
margin:20px 20px 0 0;
}
ul li a {
display:block;
width:64px;
height:64px;
overflow:hidden;
border:1px solid trasparent;
line-height:64px;
;
text-decoration:none;
text-shadow:0 -1px 0 rgba(0,0,0,0.5);
border-radius:5px;
-webkit-border-radius:5px;
-moz-border-radius:5px;
}
ul li a:hover, ul li a:focus, ul li a:active {
opacity:0.8;
border-color:#000;
}
.facebook a {
position:relative;
border-color:#3c5a98;
text-transform:lowercase;
text-indent:34px;
letter-spacing:10px;
font-weight:bold;
font-size:64px;
line-height:66px;
color:#fff;
background:#3c5a98;
-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);
-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);
box-shadow:0 0 4px rgba(0,0,0,0.4);
}
.twitter a {
position:relative;
border-color:#a8eaec;
text-transform:lowercase;
text-indent:20px;
letter-spacing:40px;
font:bold 60px/1 Tahoma, Geneva, sans-serif;
line-height:60px;
color:#76ddf8;
background:#daf6f7;
text-shadow:3px 3px 1px #fff, -3px -3px 1px #fff, 3px -3px 1px #fff, -3px 3px 1px #fff;
-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);
-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);
box-shadow:0 0 4px rgba(0,0,0,0.4);
background:-webkit-gradient(linear, left top, left bottom, from(#dbf7f8), to(#88e1e6));
background:-moz-linear-gradient(top, #dbf7f8, #88e1e6);
background:-o-linear-gradient(top, #dbf7f8, #88e1e6);
background:linear-gradient(top, #dbf7f8, #88e1e6);
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr="#dbf7f8", endColorstr="#88e1e6");
}
.rss a {
position:relative;
width:60px;
padding:0 2px;
border-color:#ea6635;
text-transform:lowercase;
text-indent:-186px;
font-size:64px;
font-weight:bold;
color:#fff;
background:#e36443;
-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);
-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);
box-shadow:0 0 4px rgba(0,0,0,0.4);
background:-webkit-gradient(linear, left top, left bottom, from(#f19242), to(#e36443));
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr="#f19242", endColorstr="#e36443");
}
.rss a:before {
content:"\00a0";
position:absolute;
bottom:10px;
left:10px;
width:12px;
height:12px;
background:#ffffff;
-moz-border-radius:12px;
-webkit-border-radius:12px;
border-radius:12px;
}
.rss a:after {
content:"\00a0";
position:absolute;
bottom:10px;
left:10px;
width:22px;
height:22px;
border-style:double;
border-width:24px 24px 0 0;
border-color:#fff;
-moz-border-radius:0 50px 0 0;
-webkit-border-top-right-radius:50px;
border-radius:0 50px 0 0;
}
.flickr a {
position:relative;
border-color:#d2d2d2;
text-indent:-9000px;
font-size:108px;
font-weight:bold;
color:#fff;
background:#fff;
-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);
-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);
box-shadow:0 0 4px rgba(0,0,0,0.4);
background:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#d2d2d2));
background:-moz-linear-gradient(top, #fff, #d2d2d2);
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr="#ffffff", endColorstr="#d2d2d2");
}
.flickr a:before {
content:"\00a0";
position:absolute;
top:50%;
left:30%;
width:20px;
height:20px;
margin:-10px 0 0 -10px;
background:#085ec5;
border:1px solid #003c84;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
background:-webkit-gradient(linear, left top, left bottom, from(#005cc6), to(#003d83));
background:-moz-linear-gradient(top, #005cc6, #003d83);
background:-o-linear-gradient(top, #005cc6, #003d83);
background:linear-gradient(top, #005cc6, #003d83);
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr="#005cc6", endColorstr="#003d83");
}
.flickr a:after {
content:"\00a0";
position:absolute;
top:50%;
right:30%;
width:20px;
height:20px;
margin:-10px -10px 0 0;
border:1px solid #ba0060;
background:#fd1e93;
-moz-border-radius:20px;
-webkit-border-radius:20px;
border-radius:20px;
background:-webkit-gradient(linear, left top, left bottom, from(#fd1e93), to(#cb026c));
background:-moz-linear-gradient(top, #fd1e93, #cb062c);
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr="#fd1e93", endColorstr="#cb026c");
}
.delicious a {
position:relative;
border-color:#d2d2d2;
text-align:center;
font-size:108px;
font-weight:bold;
color:#fff;
background:#fff;
text-indent:-9999px;
-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);
-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);
box-shadow:0 0 4px rgba(0,0,0,0.4);
background:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#d1d1d1));
background:-moz-linear-gradient(top, #fff, #d1d1d1);
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr="#ffffff", endColorstr="#d1d1d1");
}
.delicious a:before {
content:"\00a0";
position:absolute;
top:0;
right:0;
width:30px;
height:30px;
border:1px solid #0060ce;
background:#085ec5;
-moz-border-radius-topright:4px;
-webkit-border-top-right-radius:4px;
border-top-right-radius:4px;
background:-webkit-gradient(linear, left top, left bottom, from(#0060ce), to(#003b7f));
background:-moz-linear-gradient(top, #0060ce, #003b7f);
}
.delicious a:after {
content:"\00a0";
position:absolute;
left:0;
bottom:0;
width:30px;
height:30px;
border:1px solid #000;
background:#000;
-moz-border-radius-bottomleft:4px;
-webkit-border-bottom-left-radius:4px;
background:-webkit-gradient(linear, left top, left bottom, from(#212121), to(#000000));
background:-moz-linear-gradient(top, #212121, #000000);
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr="#212121", endColorstr="#000000");
}
.linkedin a {
position:relative;
width:60px;
overflow:hidden;
padding:0 2px;
border-color:#185c80;
text-transform:lowercase;
text-indent:-185px;
font-size:64px;
font-weight:bold;
color:#fff;
background:#0c6596;
-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);
-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);
box-shadow:0 0 4px rgba(0,0,0,0.4);
background:-webkit-gradient(linear, left top, left bottom, from(#5babcb), to(#0c6596));
background:-moz-linear-gradient(top, #5babcb, #0c6596);
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr="#5babcb", endColorstr="#0c6596");
}
.google a {
position:relative;
border-color:#26478d;
text-transform:lowercase;
text-indent:16px;
letter-spacing:40px;
font: 65px/44px Georgia, Times New Roman, Times, serif;
color:#fff;
background:#1e3c7f;
-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);
-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);
box-shadow:0 0 4px rgba(0,0,0,0.4);
background:-webkit-gradient(linear, left top, left bottom, from(#447aec), to(#1e3c7f));
background:-moz-linear-gradient(top, #447aec, #1e3c7f);
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr="#447aec", endColorstr="#1e3c7f");
}
.orkut a {
position:relative;
border-color:#b4c4dd;
text-indent:-9000px;
font-size:108px;
color:#b62b91;
background:#fff;
-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);
-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);
box-shadow:0 0 4px rgba(0,0,0,0.4);
background:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#ceddf6));
background:-moz-linear-gradient(top, #fff, #ceddf6);
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr="#ffffff", endColorstr="#ceddf6");
}
.orkut a:before {
content:"\00a0";
position:absolute;
top:50%;
left:50%;
width:40px;
height:40px;
border:1px solid #b0699e;
margin:-21px 0 0 -21px;
background:#d779c0;
-moz-border-radius:40px;
-webkit-border-radius:40px;
border-radius:40px;
-moz-box-shadow:0 0 2px rgba(0,0,0,0.6);
-webkit-box-shadow:0 0 2px rgba(0,0,0,0.6);
box-shadow:0 0 2px rgba(0,0,0,0.6);
}
.orkut a:after {
content:"\00a0";
position:absolute;
top:50%;
left:50%;
height:26px;
width:26px;
margin:-13px 0 0 -13px;
background:#ffffff;
-moz-border-radius:26px;
-webkit-border-radius:26px;
border-radius:26px;
-moz-box-shadow: 0 0 2px rgba(0,0,0,0.6);
-webkit-box-shadow: 0 0 2px rgba(0,0,0,0.6);
box-shadow: 0 0 2px rgba(0,0,0,0.6);
background:-webkit-gradient(linear, left top, left bottom, from(#eff4fc), to(#dce6f8));
background:-moz-linear-gradient(top, #eff4fc, #dce6f8);
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr="#eff4fc", endColorstr="#dce6f8");
}
.technorati a {
position:relative;
border-color:#266f12;
text-indent:-9999px;
font-size:108px;
color:#b62b91;
background:#086b04;
-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);
-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);
box-shadow:0 0 4px rgba(0,0,0,0.4);
background:-webkit-gradient(linear, left top, left bottom, from(#a3d679), to(#086b04));
background:-moz-linear-gradient(top, #a3d679, #086b04);
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr="#a3d679", endColorstr="#086b04");
}
.technorati a:before {
content:"\00a0";
position:absolute;
top:5px;
right:-5px;
width:40px;
height:25px;
border:8px solid #f5f5f5;
-moz-border-radius:45px/35px;
-webkit-border-top-left-radius:45px 35px;
-webkit-border-top-right-radius:45px 35px;
-webkit-border-bottom-right-radius:45px 35px;
-webkit-border-bottom-left-radius:45px 35px;
border-radius:45px/35px;
-moz-box-shadow:0 0 2px rgba(0,0,0,0.6);
-webkit-box-shadow:0 0 2px rgba(0,0,0,0.6);
box-shadow:0 0 2px rgba(0,0,0,0.6);
}
.technorati a:after {
content:"\00a0";
position:absolute;
top:40px;
left:20px;
width:0;
height:0;
border-width:0 0 18px 13px;
border-style:solid;
border-color: transparent #f5f5f5;
}
.netvibes a {
position:relative;
border-color:#0c5f0c;
text-align:center;
text-indent:-9000px;
font-size:178px;
font-weight:bold;
color:#fff;
background:#138210;
-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);
-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);
box-shadow:0 0 4px rgba(0,0,0,0.4);
background:-webkit-gradient(linear, left top, left bottom, from(#68db21), to(#138210));
background:-moz-linear-gradient(top, #68db21, #138210);
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr="#68db21", endColorstr="#138210");
}
.netvibes a:after {
content:"+";
position:absolute;
left:0;
top:0;
width:64px;
text-indent:0;
text-align:center;
font-size:88px;
color:#fff;
}

在浏览器中的预览效果

  在firefox3.6中:

2013032116010190.png

2013032116010190.png

在chrome中预览效果:

2013032116010191.png

2013032116010191.png

在ie9中预览效果:

2013032116010192.png

2013032116010192.png

在ie8中预览效果:

2013032116010193.png

2013032116010193.png

主要支持的浏览器有:irefox 3.5+, Safari 4+, Chrome 4+, Opera 10+, IE8+.

回复

使用道具 举报

0

主题

2万

回帖

120

积分

注册会员

Rank: 2

积分
120
发表于 2022-10-2 02:06:18 | 显示全部楼层
笑纳了老板
回复 支持 反对

使用道具 举报

1

主题

2万

回帖

79

积分

注册会员

Rank: 2

积分
79
发表于 2022-10-6 15:43:47 | 显示全部楼层
谢谢楼主分享
回复 支持 反对

使用道具 举报

2

主题

2万

回帖

473

积分

中级会员

Rank: 3Rank: 3

积分
473
发表于 2023-11-8 11:59:38 | 显示全部楼层
这个源码还可以
回复 支持 反对

使用道具 举报

0

主题

1万

回帖

100

积分

注册会员

Rank: 2

积分
100
发表于 2023-12-12 09:57:15 | 显示全部楼层
好人好人好人好人
回复 支持 反对

使用道具 举报

2

主题

2万

回帖

380

积分

中级会员

Rank: 3Rank: 3

积分
380
发表于 2024-3-2 10:09:20 | 显示全部楼层
额头额定法国队是范德萨
回复 支持 反对

使用道具 举报

2

主题

2万

回帖

347

积分

中级会员

Rank: 3Rank: 3

积分
347
发表于 2024-3-10 15:32:42 | 显示全部楼层
了乐趣了去了去了去了去了
回复 支持 反对

使用道具 举报

0

主题

2万

回帖

0

积分

中级会员

Rank: 3Rank: 3

积分
0
发表于 2024-3-22 04:05:20 | 显示全部楼层
hi哦和烦恼农家女
回复 支持 反对

使用道具 举报

1

主题

2万

回帖

182

积分

注册会员

Rank: 2

积分
182
发表于 2024-6-8 15:31:56 | 显示全部楼层
搞个免费的用用
回复 支持 反对

使用道具 举报

27

主题

2万

回帖

331

积分

中级会员

Rank: 3Rank: 3

积分
331
发表于 2024-6-18 13:24:34 | 显示全部楼层
vcxvcxv
回复 支持 反对

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

手机版|小黑屋|网站地图|源码论坛 ( 海外版 )

GMT+8, 2024-12-3 05:30 , Processed in 0.074101 second(s), 25 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表