На странице сделал checkbox, который при нажатии добавляет и убирает классы тегам, но столкнулся с проблемой, что при нажатии на него страница прокручивается вниз. Как можно исправить?
Вот код:
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap&subset=cyrillic"
rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab&display=swap&subset=cyrillic" rel="stylesheet">
<title>Testing</title>
<?php wp_head(); ?>
</head>
<body class="body">
<header>
<div class="container-fluid header">
<div class="container">
<div class="row">
<span class="header-text">Testing</span>
</div>
</div>
</div>
</header>
<main>
<div class="container d-flex flex-column-reverse flex-sm-row first-screen">
<div class="col-12 col-md-6 col-sm-3 block-1">
<span class="line"></span>
<h1 class="first-screen__headline">
TESTING PAGE
</h1>
<p class="first-screen__text text-center">
Since you've gone I've been lost without a trace <br>
I dream at night I can only see your face <br>
I look around, but it's you I can't replace <br>
I feel so cold and I long for your embrace <br>
I keep crying baby, baby, please
</p>
</div>
<div class="col-12 col-sm-6 block-2">
<img src="http://vladnebo.beget.tech/wp-content/uploads/2020/01/Sting-3.jpg" alt="">
</div>
</div>
<div class="container-fluid info">
<div class="container d-flex flex-column flex-sm-row justify-content-between align-items-center">
<div class="col-12 col-sm-8">
<div class="info-text">
<h2 class="info__title">Это заголовок</h2>
<p class="info__description">Проснувшись однажды утром после беспокойного сна, Грегор Замза
обнаружил, что он у себя в
постели превратился в страшное насекомое.
</p>
</div>
</div>
<div class="col-12 col-sm-3 text-center">
<button type="button" class="btn btn-lg info__btn">Кликните</button>
</div>
</div>
</div>
<div class="container d-flex flex-row justify-content-center social">
<a><svg xmlns="http://www.w3.org/2000/svg" width="60%" height="60%" viewBox="0 0 24 24" class="svg">
<path id="facebook"
d="M9 8h-3v4h3v12h5v-12h3.642l.358-4h-4v-1.667c0-.955.192-1.333 1.115-1.333h2.885v-5h-3.808c-3.596 0-5.192 1.583-5.192 4.615v3.385z" />
</svg></a>
<a><svg xmlns="http://www.w3.org/2000/svg" width="60%" height="60%" viewBox="0 0 24 24" class="svg">
<path id="twitter"
d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z" />
</svg></a>
<a><svg xmlns="http://www.w3.org/2000/svg" width="60%" height="60%" viewBox="0 0 24 24" class="svg">
<path id="youtube"
d="M19.615 3.184c-3.604-.246-11.631-.245-15.23 0-3.897.266-4.356 2.62-4.385 8.816.029 6.185.484 8.549 4.385 8.816 3.6.245 11.626.246 15.23 0 3.897-.266 4.356-2.62 4.385-8.816-.029-6.185-.484-8.549-4.385-8.816zm-10.615 12.816v-8l8 3.993-8 4.007z" />
</svg></a>
</div>
<!-- Кнопка для переключения стиля темы -->
<div class="dark-theme">
<input type="checkbox" id="switch-dark" class="switch-check">
<label for="switch-dark" class="switch-label">
<span>Скрыть текст</span>
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 24 24">
<path
d="M14 19h-4c-.276 0-.5.224-.5.5s.224.5.5.5h4c.276 0 .5-.224.5-.5s-.224-.5-.5-.5zm0 2h-4c-.276 0-.5.224-.5.5s.224.5.5.5h4c.276 0 .5-.224.5-.5s-.224-.5-.5-.5zm.25 2h-4.5l1.188.782c.154.138.38.218.615.218h.895c.234 0 .461-.08.615-.218l1.187-.782zm3.75-13.799c0 3.569-3.214 5.983-3.214 8.799h-5.572c0-2.816-3.214-5.23-3.214-8.799 0-3.723 2.998-5.772 5.997-5.772 3.001 0 6.003 2.051 6.003 5.772zm4-.691v1.372h-2.538c.02-.223.038-.448.038-.681 0-.237-.017-.464-.035-.69h2.535zm-10.648-6.553v-1.957h1.371v1.964c-.242-.022-.484-.035-.726-.035-.215 0-.43.01-.645.028zm-3.743 1.294l-1.04-1.94 1.208-.648 1.037 1.933c-.418.181-.822.401-1.205.655zm10.586 1.735l1.942-1.394.799 1.115-2.054 1.473c-.191-.43-.423-.827-.687-1.194zm-3.01-2.389l1.038-1.934 1.208.648-1.041 1.941c-.382-.254-.786-.473-1.205-.655zm-10.068 3.583l-2.054-1.472.799-1.115 1.942 1.393c-.264.366-.495.763-.687 1.194zm13.707 6.223l2.354.954-.514 1.271-2.425-.982c.21-.397.408-.812.585-1.243zm-13.108 1.155l-2.356 1.06-.562-1.251 2.34-1.052c.173.433.371.845.578 1.243zm-1.178-3.676h-2.538v-1.372h2.535c-.018.226-.035.454-.035.691 0 .233.018.458.038.681z" />
</svg>
</label>
</div>
</main>
<?php wp_footer(); ?>
</body>
</html>