Как сделать раскрытие текста в блоке TM201 в Tilda
Who we are
The smartest people work every day to provide the best service and to make our clients happy
  • Max Holden
    Founder & Art Director
    Max invented our company. He is the father of our main goals and values. He has founded first core members of our team and helped them to show their unique talents in work process. But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Max invented our company. He is the father of our main goals and values. He has founded first core members of our team and helped them to show their unique talents in work process. Max invented our company. He is the father of our main goals and values. He has founded first core members of our team and helped them to show their unique talents in work process. Max invented our company. He is the father of our main goals and values. He has founded first core members of our team and helped them to show their unique talents in work process. Max invented our company. He is the father of our main goals and values. He has founded first core members of our team and helped them to show their unique talents in work process.
  • Lucy Good
    Design Director
    Julia takes care of everything you can see. She spent five years in London learning visual communication. She uses her knowledge to make the world a little more beautiful. But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.
  • Eva Stark
    Customers Support
    Eva is the voice of our brand. She spends hours to make our clients feel care and enjoy communication with the company. If you have any suggestions or ideas you can write her. But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.
  • Lucy Good
    Design Director
    Julia takes care of everything you can see. She spent five years in London learning visual communication. She uses her knowledge to make the world a little more beautiful. But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.
  • Eva Stark
    Customers Support
    Eva is the voice of our brand. She spends hours to make our clients feel care and enjoy communication with the company. If you have any suggestions or ideas you can write her. But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.
  • Max Holden
    Founder & Art Director
    Max invented our company. He is the father of our main goals and values. He has founded first core members of our team and helped them to show their unique talents in work process. But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Max invented our company. He is the father of our main goals and values. He has founded first core members of our team and helped them to show their unique talents in work process. Max invented our company. He is the father of our main goals and values. He has founded first core members of our team and helped them to show their unique talents in work process. Max invented our company. He is the father of our main goals and values. He has founded first core members of our team and helped them to show their unique talents in work process. Max invented our company. He is the father of our main goals and values. He has founded first core members of our team and helped them to show their unique talents in work process.

Как сделать раскрытие текста в блоке TM201 в Tilda

1
Создали блок TM201 и заполнили его текстом
2
Добавили код в блок Другое - Т123
Mo-ti Level Up
Видео инструкции по добавлению кода и работе с Zero Block.
Делаем раскрытие текста в блоке TM201.
Добавляем свою иконку вместо картинки
Фрагмент видео
Библиотека для примера

<style>
/*Высота свёрнутого текста*/
:root { --main-height: 150px}
.short_version {height: var(--main-height) !important}
.t527__perstext , .t527__perstext:after, .t527__textbtn div:after ,
.t527__textbtn   { transition: all 0.3s}
.t527__perstext {
    height: var(--main-height);
    overflow: hidden;
    display: flex;
    position: relative;
}
.t527__perstext div{height: max-content}
.short_version.t527__perstext:after { bottom: 0px}
.t527__perstext:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 50px;
    bottom: -50px;
    left: 0;
    background-image: linear-gradient(180deg, rgba(29,29,29,0) 0%, rgba(29,29,29,1) 100%);
}
.t527__textbtn {
    color: #fff;
    font-size: 15px;
    font-weight: 400;
    margin-top: 15px;
    cursor: pointer;
}
.t527__textbtn:hover { opacity: 0.6}

.t527__textbtn div:after {
    content: "\2193";
    margin-left: 5px;
}
.short_mode .t527__textbtn div:after { content: "\2191"}
.t527__bgimg {
    background-size: contain;
    background-position-x: left;
}
</style>

<script>
$( document ).ready(function() {
$('.t527__itemwrapper').append('<div class="t527__textbtn t-text"><div>Подробнее</div></div>');
$('.t527__perstext').addClass('short_version');
$('.t527__perstext').wrapInner('<div></div>');
function setSize(){
$('.t527__perstext').each(function(){
   $(this).css('height' , $(this).children('div').height() );
});
};
setSize();
$('.t527__textbtn div').click(function() {
    $(this).closest('.t527__itemwrapper').toggleClass('short_mode');
    let text = $(this).text();$(this).text(text == "Подробнее" ? "Скрыть" : "Подробнее");
    $(this).closest('.t527__itemwrapper').find('.t527__perstext').toggleClass('short_version');
});
$(window).resize(function() {clearTimeout(window.resizedFinished); window.resizedFinished = setTimeout(function(){ setSize() }, 1000);});   
    
});
</script>
Made on
Tilda