/* https://codepen.io/pouretrebelle/pen/nmdPvj 原项目地址 */
/* 黑色方块的样式 */
.social_media {
  display: inline-block;
  position: relative;
  width: 2em;
  height: 2em;
  margin-top: 2em;
  margin-right: 0.5em;
  margin-left: 0.5em;
  text-align: center;
  border-radius: 1em;
}
/* icon 偏移 */
.social_media_icon {
  padding-top: 1.1em;
}
.social_media_article {
  border-radius: 1em;
  cursor: pointer;
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #333;
  color: #fff;
  line-height: 2px;
  transform: perspective(300px) rotateY(0deg);
  transition: transform 0.4s linear, background-color 0s linear 0.2s, color 0s linear 0.2s;
}

.social_media:hover .social_media_article {
  transform: perspective(300px) rotateY(180deg);
  color: #eee;
  transition: transform 0.2s linear, background-color 0s linear 0.1s, color 0s linear 0.1s;
}

.social_media:nth-child(1):hover .social_media_article {
  background-color: #d6c002;
}

.social_media:nth-child(2):hover .social_media_article {
  background-color: #00ACED;
}

.social_media:nth-child(3):hover .social_media_article {
  background-color: #1D9BF0;
}

.social_media:nth-child(4):hover .social_media_article {
  background-color: #0057FF;
}

.social_media:nth-child(5):hover .social_media_article {
  background-color: #07C160;
}

.social_media:nth-child(6):hover .social_media_article {
  background-color: #D52C2B;
}

.social_media:nth-child(7):hover .social_media_article {
  background-color: #FF738C;
}

.social_media:nth-child(8):hover .social_media_article {
  background-color: #EA4C89;
}

.social_media:nth-child(9):hover .social_media_article {
  background-color: #3F729B;
}

.social_media:nth-child(10):hover .social_media_article {
  background-color: #FF0084;
}

.social_media:nth-child(11):hover .social_media_article {
  background-color: #F26300;
}

.social_media:nth-child(12):hover .social_media_article {
  background-color: #445566;
}

span {
  transition: transform 0s linear 0.2s, text-shadow 0s linear 0.2s;
  display: block;
  -webkit-font-smoothing: subpixel-antialiased;
  font-smoothing: antialiased;
}

.social_media:hover span {
  transition: transform 0s linear 0.1s, text-shadow 0s linear 0.1s;
  transform: scale(-1, 1);
}

@font-face {
  font-family: "SSSocial";
  src: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/2361/ss-social-regular.eot");
  src: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/2361/ss-social-regular.eot?#iefix") format("embedded-opentype"), url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/2361/ss-social-regular.woff") format("woff"), url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/2361/ss-social-regular.ttf") format("truetype"), url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/2361/ss-social-regular.svg#SSSocialRegular") format("svg");
  font-weight: normal;
  font-style: normal;
}

/* This triggers a redraw in IE to Fix IE8's :before content rendering. */
html:hover [class^="ss-"] {
  -ms-zoom: 1;
}

.ss-icon, .ss-icon.ss-social, .ss-icon.ss-social-circle,
[class^="ss-"]:before, [class*=" ss-"]:before,
[class^="ss-"][class*=" ss-social"]:before, [class*=" ss-"][class*=" ss-social"]:before,
[class^="ss-"].right:after, [class*=" ss-"].right:after,
[class^="ss-"][class*=" ss-social"].right:after, [class*=" ss-"][class*=" ss-social"].right:after {
  font-family: "SSSocial";
  font-style: normal;
  font-weight: normal;
  text-decoration: none;
  text-rendering: optimizeLegibility;
  white-space: nowrap;
  -moz-font-feature-settings: "liga=1";
  -moz-font-feature-settings: "liga";
  -ms-font-feature-settings: "liga" 1;
  -o-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.ss-icon.ss-social-circle,
[class^="ss-"].ss-social-circle:before, [class*=" ss-"].ss-social-circle:before,
[class^="ss-"].ss-social-circle.right:after, [class*=" ss-"].ss-social-circle.right:after {
  font-weight: bold;
}

[class^="ss-"].right:before,
[class*=" ss-"].right:before {
  display: none;
  content: '';
}
