jQuery addClass example
Change class name on click in jQuery
HTML
<!doctype html>
<html>
<head>
<title>text</title>
</head>
<body>
<div class="photo">
<h1>
приветик
</h1>
<img src="https://sun9-24.userapi.com/c857124/v857124373/15c51b/Lc-y94rjsyo.jpg" />
</div>
</body>
</html>
CSS
body {
background: #20262E;
font-family: Helvetica;
}
.photo {
width: 100%;
justify-content: center;
text-align: center;
}
.photo h1 {
position:absolute;
top: 12%;
left:25%;
right: 25%;
color: #fff;
font-size:5em;
font-weight: 900
}
.photo img {
width: 100%;
height: 300px;
}