버튼 CSS

by Kim Ara

HTML

<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<div id="type1">
  <h3>Created By <a href="https://codepen.io/codery">Yasin Softaoğlu</a></h3>
<h1>TYPE 1</h1>
<div class="btn-1">
  BUTTON
</div>

<div class="btn-2">
  BUTTON
</div>

<div class="btn-3">
  BUTTON
</div>

<div class="btn-4">
  BUTTON
</div>

</div>

<div id="type2">
  <h1>TYPE 2</h1>
  
  <div class="btn-5">
  BUTTON
</div>
  
  <div class="btn-6">
  BUTTON
</div>
  
    <div class="btn-7">
  BUTTON
</div>
  
     <div class="btn-8">
  BUTTON
</div>
</div>

<div id="type4">
  
  <h1>TYPE 3</h1>

     <div class="btn-12">
  BUTTON
</div>
  
       <div class="btn-13">
  BUTTON
</div>
  
  
         <div class="btn-14">
  BUTTON
</div>
  
         <div class="btn-15">
  BUTTON
</div>
  
  </div>

<div id="type3">

  <h1>TYPE 4</h1>

  <div class="btn-9">
  CLICK
</div>
  
  <div class="btn-10">
  CLICK
</div>
  
   <div class="btn-11">
  CLICK
</div>
  
  
</div>

CSS

* {
  padding:0;
margin: 0;
}
body {
  text-align: center;
  font-family: "Roboto";
  color: #fff;
  letter-spacing:1px;
}

#type1 {
  background-color:#42a5f5;
  padding-bottom: 50px;
}

#type2 {
  background: #66bb6a;
  padding-bottom: 50px;
}

#type3 {
  background: #ffa726;
  padding-bottom: 60px;
  position: relative;
}

#type4 {
  background: #78909c;
  padding-bottom: 50px;
}

h1 {
  font-size: 50px;
  padding: 30px 0;
}

h3 {
  padding:30px 0 0 0;
}

h3 a {
  margin-left:5px;
  text-decoration: none;
  color: #fff;
  font-weight: light;
  border-bottom: 1px dotted;
  padding: 0 2px 3px 2px;
}

h3 a:hover {
  border-bottom:1px solid;
}

.btn-1 {
  text-align: center;
  display: inline-block;
  padding: 15px 40px;
  border: 1px solid #fff;
  cursor: pointer;
  letter-spacing: 2px;
  position:relative;
  overflow:hidden;
  margin: 0 20px;
}

.btn-1:before {
  content: "";
  position: absolute;
  height: 150px;
  width: 50px;
  background : #fff;
  left: -55px;
  top: -40px;
  transform: rotate(37deg);
  transition: all .3s;
  opacity: 0.3;
}

.btn-1:hover:before {
  left:95%;
}

/* Buton 1 bitti */

.btn-2 {
  text-align: center;
  display: inline-block;
  padding: 15px 40px;
  border: 1px solid #fff;
  cursor: pointer;
  letter-spacing: 2px;
  position:relative;
  overflow:hidden;
  margin: 0 20px;
}

.btn-2:before {
  content: "";
  position: absolute;
  height: 11px;
  width: 100%;
  background : #fff;
  left: 0;
  top: 0;
  transition: all .3s;
  opacity: 0.3;
}

.btn-2:hover:before {
  top: 77%;
}

/* Buton 2 Bitti */

.btn-3 {
  text-align: center;
  display: inline-block;
  padding: 15px 40px;
  border: 1px solid #fff;
  cursor: pointer;
  letter-spacing: 2px;
  position:relative;
  overflow:hidden;
  margin: 0 20px;
}

.btn-3:before {
  content: "";
  position: absolute;
  height: 11px;
  width: 100%;
  background : #fff;
  left: 0;
  bottom: 0;
  transition: all .3s;
  opacity: 0.3;
}

.btn-3:hover:before {
  bottom: 80%;
}

/* Buton 3 Bitti...