<html>
<head>
<meta charset="utf-8">
<title>Текст</title>
<style>
body{
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400&display=swap');
background: #3A5FCD;
}
.block{
height: 100%;
max-height:46px;
padding: 15px 15px 15px 70px;
background:#FFFAFA; /* Цвет фона */
position:relative;
white-space: nowrap;
margin: 50px;
box-sizing: border-box;
text-overflow: ellipsis;
line-height:
;
/* работает но не так как надо или я просто тупой
--------------------------------------------------
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
---------------------------------------------*/
overflow: hidden;
transition: line-clamp 1s,max-height 0.5s cubic-bezier(0, 1, 0, 1);
border-radius: 7px;
font-family: 'Open Sans', sans-serif;
}
.block:hover{
transition: max-height 1s ease-in-out;
max-height: 500px;
background: #FFFFFF;
white-space: normal;
}
.center{
height: 26px;
width: 26px;
border-radius: 7px;
background: #FFB800;
padding:10px 10px 10px 10px;
position:absolute;
left: 0px;
top: 0px;
}
img {
margin-left: -2px;
margin-right: auto;
margin-top: -3px;
}
.size{
margin:-5px;
}
</style>
</head>
<body>
<div class="block">
Текст (от лат. textus — ткань; сплетение, сочетание) — зафиксированная на каком-либо материальном носителе человеческая мысль; в общем плане связная и полная последовательность символов.
<div class="center">
<Img src="https://image.flaticon.com/icons/png/512/95/95458.png" Width="30" Height="30">
</div>
</div>
</body>
</html>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.