Прозрачные кнопки CSS3

by Andrey Dobrovoi

HTML

<div class="container">
  <div class="box-white">
    <a class="btn" href="#">Прозрачная кнопка</a>
  </div>

  <div class="box-blue">
    <a class="btn-white" href="#">Прозрачная кнопка</a>
  </div>
  <div class="img-bg">
    <a class="btn-white" href="#">Прозрачная кнопка</a>
  </div>
</div>

CSS

/****************************************************************************
 * Базовые стили демо
 ****************************************************************************/

body {
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  line-height: 1.428571429;
  color: #333;
  min-width: 300px;
  padding: 0;
  margin: 0;
}

a {
  text-decoration: none;
}

div.container {
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.box-blue {
  max-width: 100%;
  background-color: #2E6F92;
  text-align: center;
  padding: 40px;
}

.box-white {
  max-width: 100%;
  background-color: #fff;
  text-align: center;
  padding: 40px;
}

.img-bg {
  max-width: 100%;
  background: #454d62 url(https://www.webpagefx.com/blog/images/assets/cdn.sixrevisions.com/demos/semi-transparent-buttons/demo/bg.jpg) no-repeat center center;
  background-attachment: fixed;
  background-size: cover;
  text-align: center;
  padding: 40px;
}

/****************************************************************************
 * Кнопки
 ****************************************************************************/

.btn {
  background: rgba(46, 111, 146, 0);
  border: 1px solid #2e6f92;
  border-radius: 5px;
  box-sizing: border-box;
  color: #1269a2;
  display: inline-block;
  padding: 15px 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 300ms ease-in;
  cursor: pointer;
  font-size: 14px;
  font-weight: 100;
}

.btn:hover {
  background: rgba(46, 111, 146, 0.8);
  color: #FFF;
}

.btn-white {
  background: rgba(46, 111, 146, 0);
  border: 1px solid #fff;
  border-radius: 5px;
  box-sizing: border-box;
  color: #fff;
  display: inline-block;
  padding: 15px 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 300ms ease-in;
  cursor: pointer;
  font-size: 14px;
  font-weight: 100;
}

.btn-white:hover,
.btn-white:focus,
.btn-white:active {
  background: rgba(255, 255, 255, 0.9);
  color: #2e6f92;
}

JavaScript

/* ========================================================================= */
/*	shurawi --- dbmast.ru ---
/* ========================================================================= */