Дизайн двух кнопок
Всем привет, посмотрел на одном сайте американском прикольную фишку и решил сделать подобное. Чтобы сделать как-бы одну кнопку, но одна синяя, а другая прозрачная но с цветом кнопки. Решил сделать немного костыльно, а именно две кнопки поставить на одну позицию, но столкнулся с проблемой. Как убрать конец кнопки, или как это будет все правильно реализовать
.acbutton {
position: relative;
width: 140px;
top: 150px;
height: 40px;
border: none;
border-radius: 25px;
font-family: 'Webnar';
background: linear-gradient(to right, rgba(41, 182, 246,1.0),rgba(66, 165, 245,1.0));
color: white;
outline: none;
cursor: pointer;
}
.video {
position: relative;
width: 190px;
top: 150px;
right: 300px;
height: 40px;
border: none;
border-radius: 25px;
font-family: 'Webnar';
background: rgba(1,1,1,0);
box-shadow: 0 0 5px 0 rgba(1,1,1,0.5);
color: white;
outline: none;
cursor: pointer;
}
<a href=""></a><button class="acbutton">Скачать античит</button>
<a href=""><button class="video" style="color: rgba(41, 182, 246,1.0)">Посмотреть видео</button></a>
Вот так должно быть
Ответы (2 шт):
Автор решения: vantal
→ Ссылка
Намудрили вы со стилями, конечно, особенно с позиционированием, трогать не буду, выполню только вашу проблему с наложением
.acbutton {
position: relative;
width: 140px;
top: 150px;
height: 40px;
border: none;
border-radius: 25px;
font-family: 'Webnar';
background: linear-gradient(to right, rgba(41, 182, 246,1.0),rgba(66, 165, 245,1.0));
color: white;
outline: none;
cursor: pointer;
z-index: 10;
}
.video {
position: relative;
width: 190px;
top: 150px;
right: 300px;
height: 40px;
border: none;
border-radius: 25px;
font-family: 'Webnar';
background: rgba(1,1,1,0);
box-shadow: 0 0 5px 0 rgba(1,1,1,0.5);
color: white;
outline: none;
cursor: pointer;
}
<a href=""></a><button class="acbutton">Скачать античит</button>
<a href=""><button class="video" style="color: rgba(41, 182, 246,1.0)">Посмотреть видео</button></a>
Автор решения: CbIPoK2513
→ Ссылка
Размер картинки у примера очень маленький, но пытался сделать максимально похоже.
.two-button {
display: block;
width: auto;
}
.two-button a {
display: inline-block;
padding: 10px 16px;
border-radius: 50px;
text-decoration: none;
box-sizing: border-box;
}
.two-button a:nth-child(1) {
min-width: 250px;
background: #fff;
color: #757575;
box-shadow: 0 0 3px 1px rgba(0,0,0,.15), 0 0 15px 3px rgba(0,0,0,.05);
}
.two-button a:nth-child(2) {
background: #4a90e1;
color: #fff;
box-shadow: 0 0 3px 1px rgba(0,0,0,.1) inset;
margin-left: -32px;
}
<div class="two-button">
<a href="#">Смотреть видео</a>
<a href="#">Скачать античит</a>
</div>

