This media is not supported in your browser
VIEW IN TELEGRAM
HTML
<div class="flex">
<h2 class="opros">Ты тупой?</h2>
</div>
<div class="flex">
<div class="board">
<button id="btn1" class="btn">Да</button>
<button id="btn" class="btn">Нет</button>
</div>
</div>
<div class="flex">
<h2 class="opros">Ты тупой?</h2>
</div>
<div class="flex">
<div class="board">
<button id="btn1" class="btn">Да</button>
<button id="btn" class="btn">Нет</button>
</div>
</div>
👍63🤣48🔥12❤3🏆3⚡2🤡2👎1
CSS
body{
background: #222;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
height: 100vh;
box-sizing: border-box;
}
.flex{
display: flex;
justify-content: center;
}
h2{
color: #fff;
letter-spacing: 1px;
}
.btn{
position: relative;
text-transform: uppercase;
letter-spacing: 1px;
width: 120px;
font-weight: bold;
height: 50px;
transition: 0.08s;
border: none;
background: #fff;
border-radius: 10px;
cursor: pointer;
margin: 40px 5px;
}
body{
background: #222;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
height: 100vh;
box-sizing: border-box;
}
.flex{
display: flex;
justify-content: center;
}
h2{
color: #fff;
letter-spacing: 1px;
}
.btn{
position: relative;
text-transform: uppercase;
letter-spacing: 1px;
width: 120px;
font-weight: bold;
height: 50px;
transition: 0.08s;
border: none;
background: #fff;
border-radius: 10px;
cursor: pointer;
margin: 40px 5px;
}
❤🔥20👍16🤣3⚡2👎2🤨2👨💻2🤩1🌚1
JS
let btn1 = document.querySelector('#btn1');
let opros = document.querySelector('.opros');
const random = (min, max) => {
const rand = min + Math.random() * (max - min + 1);
return Math.floor(rand);
}
let btn = document.querySelector('#btn');
btn.addEventListener('mouseenter', () => {
btn.style.left = `
btn.style.top = `
})
btn.addEventListener('click', function(){
opros.textContent = 'Ошибка повторите попытку!!!'
})
btn1.addEventListener('click', function(){
opros.textContent = 'Спасибо за честность!!!'
})
let btn1 = document.querySelector('#btn1');
let opros = document.querySelector('.opros');
const random = (min, max) => {
const rand = min + Math.random() * (max - min + 1);
return Math.floor(rand);
}
let btn = document.querySelector('#btn');
btn.addEventListener('mouseenter', () => {
btn.style.left = `
${random(0, 90)}%`;btn.style.top = `
${random(0, 90)}%`;})
btn.addEventListener('click', function(){
opros.textContent = 'Ошибка повторите попытку!!!'
})
btn1.addEventListener('click', function(){
opros.textContent = 'Спасибо за честность!!!'
})
🔥16👨💻13👍10❤5🤓3🤣2
This media is not supported in your browser
VIEW IN TELEGRAM
Файлы HTML & CSS & JS 👇🏻
👍36🔥18👌4❤3👏3⚡2🥰2