Цветовая схема кнопки
Помогите сверстать вот такую белую кнопочку:
Если на неё нажать, то перекинет на определённый сайт.
Я уже сделал жёлтую кнопку "Добавить в discord":
body {
background-color: #25252e;
margin: 0;
}
.Lite {
color: white;
font-family: Bold;
font-size: 4px;
}
button[name="run_script"] {
margin: 90px;
border: none;
border-radius: 7px;
padding: 10px 25px;
background: #ff9900;
cursor: pointer;
text-transform: uppercase;
font-weight: bold;
color: white;
}
button[name="run_script"]:hover {
background: #ff6600;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="Lite">
<center>
<h1>LiteBot</h1>
</center>
</div>
<center>
<a href="https://discord.com/oauth2/authorize?client_id=897526676408373298&scope=bot%20applications.commands&permissions=8">
<button type="button" name="run_script">Добавить в discord</button>
</a>
</center>
</body>
</html>
Теперь мне нужно сделать вот такую же белую, но у меня не получается.
Ответы (1 шт):
Автор решения: UModeL
→ Ссылка
Не знаю, в чём сложность просто поменять цвет фона кнопки на нужный, но судя по разметке, вопросы только начинаются. Не сто́ит использовать устаревшие теги, а вот относительно новые технологии желательны.
body {
margin: 0;
background-color: #25252e;
}
.lite {
font-size: .75rem;
text-align: center;
color: white;
}
.buttons {
margin: 0 auto;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: stretch;
gap: 1rem;
width: max-content;
}
.button {
display: flex;
justify-content: center;
align-items: center;
padding: 1em 6em;
border: none;
border-radius: 7px;
font: bold 1rem/1em Arial;
text-transform: uppercase;
text-decoration: none;
color: white;
background: none;
cursor: pointer;
}
.add { background: #f90; color: white; }
.add:hover { background: #f60; }
.adv { background: #fff; color: black; }
.adv:hover { background: #ff6600; color: white; }
<h1 class="lite">LiteBot</h1>
<div class="buttons">
<a href="#" class="button add">Добавить в discord</a>
<button class="button adv">Подробнее</button>
</div>
