JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Kiwi </title>
<link rel="stylesheet" href="...css"/>
<script src="jquery-2.1.4.min.js"></script>
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<link href='https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="hea">
<div class="drop">
<div class="text">
<h2>Что такое KIWI </h2> <br>
<p>KIWI-это всенародный фруктовый деликатес,имеющий широкое распростронение в Азии,европе ,а так же Америке.</p> <br>
<p>Употребляя KIWI Вы получаете высокое содержание калия,-и получая полный комплекс маркро-и микроэлиментов,сокращая риск возникновения онкологических болезней</p> <br>
<p>Употребляя KIWI вы предотвращаетет возможность возниквовения рака </p>
</div>
<img src="45.svg" alt="qiwi" />
<div class="button">
<span class="what-the-qiwi">Что такое KIWI</span>
<span class="arrow"></span>
</div>
</div>
</div>
<script src="2.js "></script>
</body>
</html>
CSS
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #ffffff;
font-family: "Open Sans", arial;
max-width: 1300px;
margin: 0 auto;
}
.hea {
position: absolute;
width: 100%;
left: 0px;%;
}
.drop img{
position: absolute;
height: 200px;
right: 100px;;
top: 0;
opacity: 0;
transition:.3s;
}
.drop.opened img {
opacity: 1;
}
.drop {
margin: 0 auto;
height: 0;
padding-bottom: 30px;
background-color: #1e4592;
position: relative;
overflow: hidden;
width: 100%;
}
.text {
max-width: 450px;
min-width: 450px;
margin-left: 100px;
margin-top: 50px;
color: #fff;
position: absolute;
font-size: 18px;
opacity: 0;
transition: .3s;
-webkit-transition: .3s;
}
.text p {
line-height: 20px;
}
.drop.opened .text {
opacity: 1;
}
.button {
width: 100%;
height: 20px;
position: absolute;
bottom: 0;
text-align: center;
color: #fff;
cursor: pointer;
overflow: hidden;
}
.what-the-qiwi {
padding: 0 10px;
}
.arrow {
display: inline-block;
width: 10px;
height: 10px;
border: 3px solid white;
border-left: none;
border-top: none;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
transition: .3s;
-webkit-transition: .3s;
}
.drop.opened .arrow {
transform: rotate(225deg);
-webkit-transform: rotate(225deg);
}
JavaScript
$('.button').on('click', function(){
if($(this).parents('.drop').is('.opened') !== true) {
$('.drop').addClass('opened');
$(".drop").animate({
height: 400,
}, 200);
}
else if($(this).parents('.drop').is('.opened') === true){
$('.drop').removeClass('opened');
$(".drop").animate({
height: 0,
}, 200);
}
});