3D кнопка с помощью CSS3

Разработка 3D кнопка с помощью CSS3

Создаем 3D кнопку с помощью CSS3.

baltun

Администратор
Сообщения
10.860
Реакции
2.582
Баллы
2.003
baltun разместил(а) новый ресурс:

3D кнопка с помощью CSS3 - Создаем 3D кнопку с помощью CSS3.

Как вы понимаете CSS можно подогнать под любой проект, мы покажем работу на примере нашей разметки HTML:
HTML:
<a href="#" class="button">CLICK</a>
Далее пишем CSS:
CSS:
.button {
  display: block;
  font-size: 22px;
  text-align: center;
  line-height: 44px;
  text-decoration: none;
  color: white;
  background-color: #CC4331;
  border-radius: 4px;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 124px;
  height: 44px;
  margin-top: -22px;
  margin-left: -62px...

Посмотреть страницу этого ресурса...
 
А ещё можно вот так:
HTML:
<a class="bbutton" style="text-shadow: none;" href="/account/upgrades">Приобрести</a>
CSS:
.bbutton {
  color: rgba(255, 69, 0, 0.21);
  background: transparent;
  border-width: 2px;
  border-style: solid;
  border-color: rgba(255, 69, 0, 0.21);
  position: relative;
  margin: 1em;
  display: inline-block;
  padding: 0.5em 1em;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  text-align: center;
  font-family: comfortaa;
  font-weight: bold;
}

.bbutton:before,
.bbutton:after {
  content: '';
  display: block;
  position: absolute;
  border-color: rgba(255, 69, 0, 0.21);
  box-sizing: border-box;
  border-style: solid;
  width: 1em;
  height: 1em;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}

.bbutton:before {
  top: -6px;
  left: -6px;
  border-width: 2px 0 0 2px;
  z-index: 5;
}

.bbutton:after {
  bottom: -6px;
  right: -6px;
  border-width: 0 2px 2px 0;
}

.bbutton:hover:before,
.bbutton:hover:after {
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  border-color: #ff4500;
}

.bbutton:hover {
  color: #ff4500;
  background-color: #212121;
  border-color: #ff4500;
}
IMG_20180713_151033_560.jpgIMG_20180713_151007_073.jpg
И ещё вот так :i-m_so_happy:
HTML:
<a href="/pages/account_upgrade/" class="upgbtn">Платные услуги</a>
CSS:
.upgbtn{
    outline: none;
    display: inline-block;
    width: 140px;
    height: 22px;
    line-height: 27px;
    border-radius: 45px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    text-align: center;
    font-weight: 600;
    background: rgb(87, 87, 87);
    box-shadow: 0 8px 15px rgba(0,0,0,.1);
    transition: .3s;
    padding-left: 45px;
    padding-right: 45px;
}
.upgbtn:hover {
  background: #004a75;
  box-shadow: 0 15px 20px #022e48;
  color: white;
  transform: translateY(-7px);
}
HTML:
<a href="/arcade/" class="gamebtn">Поиграем?</a>
CSS:
.gamebtn{
    outline: none;
    display: inline-block;
    width: 140px;
    height: 22px;
    line-height: 27px;
    border-radius: 45px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    text-align: center;
    font-weight: 600;
    color: #524f4e;
    background: rgb(87, 87, 87);
    box-shadow: 0 8px 15px rgba(0,0,0,.1);
    transition: .3s;
    padding-left: 45px;
    padding-right: 45px;
}
.gamebtn:hover {
  background: #ff4500;
  box-shadow: 0 15px 20px rgba(100, 27.1,.4);
  color: white;
  transform: translateY(-7px);
}
IMG_20180713_153016_671.jpgIMG_20180713_153038_589.jpgIMG_20180713_153056_021.jpg
 
Последнее редактирование:
Назад
Верх Низ