<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<img src="img-removebg-preview.png" alt="" width="300" height="300" class="img-btn1">
</body>
<style>
.img-btn1{
transition-duration: 0.2s;
cursor: pointer;
}
.img-btn1:hover{
filter:brightness(80%);
transition-duration: 0.2s;
}
</style>
<script>
let img_btn1 = document.querySelector('.img-btn1')
img_btn1.onclick = function(){
alert("Нажата")
}
</script>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="album">Я альбом первый</div>
<div class="album">Я альбом второй</div>
<div class="album">Я альбом третий</div>
<div class="album">Я альбом четвертый</div>
<div class="album">Я альбом пятый</div>
<div class="album">Я альбом шестой</div>
<div class="album">Я альбом седьмой</div>
<div class="album">Я альбом восьмой</div>
<div class="album">Я альбом девятый</div>
<div class="album">Я альбом десятый</div>
</body>
<style>
@import url(https://fonts.googleapis.com/css?family=Montserrat:100,200,300,regular,500,600,700,800,900,100italic,200italic,300italic,italic,500italic,600italic,700italic,800italic,900italic);
*{
margin:0;
padding:0;
}
.album{
width: 200px;
height: 200px;
display: flex;
justify-content: center;
align-items: center;
margin: 15px;
font-family: Montserrat;
color: white;
background: black;
border-radius: 2px;
}
</style>
<script>
let albums = Array.from(document.querySelectorAll('.album'))
albums.forEach(function(alb){
alb.onclick = function(){
alert(alb.innerHTML)
}
})
</script>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="main-block">
<div>
<h2>Название</h2>
<ol>
<li>Текст</li>
<li>Текст</li>
<li>Текст</li>
</ol>
<button class="btn">Кнопка</button>
</div>
<div>
<h2>Название</h2>
<ol>
<li>Текст</li>
<li>Текст</li>
</ol>
<button class="btn">Кнопка</button>
</div>
<div>
<h2>Название</h2>
<ol>
<li>Текст</li>
<li>Текст</li>
<li>Текст</li>
<li>Текст</li>
</ol>
<button class="btn">Кнопка</button>
</div>
</div>
</body>
<style>
*{
margin:0;
padding:0;
}
.btn{
margin-top: auto;
}
.main-block{
width: 100%;
display: flex;
justify-content: center;
flex-wrap: wrap;
}
.main-block div{
width: 300px;
height: 350px;
margin: 10px;
display: flex;
flex-direction: column;
align-items: center;
border-radius: 3px;
padding: 10px;
box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, 0.268);
}
</style>
</html>
<body>
<p class="text">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Consequuntur laudantium commodi corporis, sunt repellendus impedit quo veritatis reiciendis. Deleniti sequi cumque id animi cupiditate, cum maiores eaque minus maxime itaque.</p>
</body>
<script>
let text = document.querySelector('.text')
text.innerHTML = text.innerHTML.slice(0, 16) + "..."
</script>