JSFiddle - React, Tailwind, and code Playground
HTML
<div class="main_form">
<p class="description_main_form">Оставьте заявку, <br> и мы перезвоним в течении 10 минут</p>
<form action="mail.php" method="POST">
<input type="text" placeholder="Имя" name="name">
<input type="tel" placeholder="Телефон" name="tel">
<a class="show_select_monkey" href="">выбрать обезьянку</a>
<div class="select_monkey ">
<p><label for="mia"><input type="radio" name="name_monkey" value="МИЯ" id="mia"><span class="radio__text">Мия (фиолетовая с белым хохолком)</span></label></p>
<p><label for="boris1"><input type="radio" name="name_monkey" value="БОРИС" id="boris1"><span class="radio__text">Борис (синяя с оранжевым хохолком)</span></label></p>
<p><label for="sofia1"><input type="radio" name="name_monkey" value="СОФИЯ" id="sofia1"><span class="radio__text">София (белая с розовым хохолком)</span></label></p>
<p><label for="finn1"><input type="radio" name="name_monkey" value="ФИНН" id="finn1"><span class="radio__text">Финн (черная с голубым хохолком)</span></label></p>
<p><label for="bella1"><input type="radio" name="name_monkey" value="БЕЛЛА" id="bella1"><span class="radio__text">Белла (красная с желтым хохолком)</span></label></p>
<p><label for="zoi1"><input type="radio" name="name_monkey" value="ЗОИ" id="zoi1"><span class="radio__text">Зои (голубая с фиолетовым хохолком)</span></label></p>
</div>
<p class="price_main_form">1 100 р.</p>
<input type="submit" value="заказать">
</form>
</div>
CSS
main_form{
text-align: center;
padding-top: 15px;
}
.description_main_form{
font-family: 'Geometria',sans-serif;
font-size: 14pt;
color: #414141;
}
.main_form input{
width: 395px;
height: 60px;
border: 1px solid #dddddd;
border-radius: 8px;
display: block;
padding-left: 15px;
margin: 0 auto 10px ;
font-size: 14pt;
color: #414141;
font-family: "Geometria",sans-serif;
}
.main_form input[type=submit]{
width: 395px;
height: 60px;
border-radius: 8px;
text-transform: uppercase;
background: #7d0b95;
color: #ffdf07;
}
.show_select_monkey,
.show_select_monkey:hover,
.show_select_monkey:visited,
.show_select_monkey:focus,
.show_select_monkey:active {
font-size:14pt;
text-transform: uppercase;
text-decoration: underline;
color: #ed4bb5;
font-family: 'Geometria-Medium',sans-serif;
}
.price_main_form{
text-align: center;
font-family: 'ChalkboardSE-Regular', sans-serif;
font-size: 35pt;
color: #414141;
margin-bottom: 0;
}
.select_monkey{
display: none;
background: #ffffff;
width:400px;
height: 365px;
border: 1px solid #dddddd;
border-radius: 8px;
padding: 24px 15px 24px 24px;
text-align: left;
position: absolute;
bottom: 10px;
right: 101px;
}
.select_monkey p{
margin-bottom: 0;
}
.select_monkey label{
font-family: 'Geometria',sans-serif;
font-size: 14pt;
color: #383b3b;
white-space: normal;
display: flex;
margin-bottom: 0;
}
/*.select_monkey input{*/
/*margin-right: 15px;*/
/*margin-top: 7px;*/
/*display: flex;*/
/*}*/
.select_monkey input {
position: absolute;
z-index: -1;
opacity: 0;
margin: 7px 15px 0 0;
}
.radio__text {
position: relative;
padding: 0 0 0 35px;
cursor: pointer;
color: #7d0b95;
font-size:14pt;
font-family: 'Geometria';
}
.radio__text:before {
content: '';
position: absolute;
top: 9px;
left: 0;
...
JavaScript
$('body').on('click','.add_product_btn', function (e){
e.preventDefault();
$(this).closest('.wraper_card').find('.hidden_card_info').show();
});
$('body').on('click','.hidden_card_info', function (){
$(this).hide();
});
// выбор обезьяны в форме
var selectMonkeyButton = $('.show_select_monkey');
var selectMonkeyContainer = $('.select_monkey');
selectMonkeyButton.on('click', function (e) {
e.preventDefault();
selectMonkeyContainer.show(200);
});
var radioButtons = selectMonkeyContainer.find('input[type=radio]');
selectMonkeyContainer.on('change', radioButtons, function (e) {
selectMonkeyButton.text($(e.target).val());
$(this).hide(200);
});