FB Button

In this example below you will see how to do a FB Button with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by DavidSchreiter, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright DavidSchreiter ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>FB Button</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div class="container">
    <a id="fbLink" href="https://www.facebook.com/sharer/sharer.php?u=https://tomato-timer.com/#" target="_blank" onclick="window.open(this.href,'targetWindow','toolbar=no,location=0,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=250'); return false">
    
    <div class="circle">
      <p>Share On
       <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/F_icon.svg/2000px-F_icon.svg.png"
 alt="facbookLogo" />             
      </p>
    </div>
  </a>
</div>



<!--

<div class="container">
  <a id="fbLink" href="https://www.facebook.com" target="_blank">
    <div class="circle">
      <p>Share On
       <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/F_icon.svg/2000px-F_icon.svg.png"
 alt="facbookLogo" />             
      </p>
    </div>
  </a>
</div>

-->
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/DavidSchreiter/fb-button-aBbRZy */
body{
  margin-top:100px;
  text-align:center;
}
img{
  width:50px;
  height:50px;
}
#fbLink{
  text-decoration:none;
}
div{
    margin:0 auto;
    text-align:center;
    display:inline-block;
}
p{
  font-family:Tahoma, serif;
  padding: 0px;
  font-weight:650;
  text-shadow: 0px 1px 1px #3b5998;
}
.circle {  
  color:white;
	width: 100px;
	height: 100px;
	background-color: #3b5998;
  border:1px solid white;
  box-shadow:0px 0px 1px black;
	-moz-border-radius: 50px;
	-webkit-border-radius: 50px;
	border-radius: 50px;
  
  /*return state*/
   -webkit-transition: all .2s ease-in-out;
   -moz-transition: all .2s ease-in-out;
}
.circle:hover{
  box-shadow: 0px 5px 15px #3b5998;
  color:#3b5998;
	background-color:white;
  border:1px solid white;
  transform: scale(1.10);
  
	-moz-border-radius: 50px;
	-webkit-border-radius: 50px;
	border-radius: 50px;
}
.circle:hover p{
  text-shadow:1px 1px 1px #3b5998;
}

Comments