简体   繁体   English

联系表格与文本区域填写剩余内容

[英]Contact Form with Text Area filling remaining content

I am trying to create a contact form similar to the design bellow, but can't seem to get the correct result. 我正在尝试创建一个类似于下面的设计的联系表单,但似乎无法获得正确的结果。 I thought I could do this with flex-box, but I am having trouble getting the Text Area to Display correctly. 我以为我可以用flex-box做到这一点,但我无法正确显示文本区域。 If there is a better way to do this with keeping the HTML structure the same, I am open to suggestions. 如果有更好的方法来保持HTML结构相同,我愿意接受建议。

CodePen CodePen

在此输入图像描述

<form class="flex-container">
  <ul>
  <li>
    <input type="text" placeholder="left">
  </li>
  <li>
    <input type="text" placeholder="left">
  </li>
  <li>
    <input type="text" placeholder="left">
  </li>
  <li>
    <input type="text" placeholder="right">
  </li>
  <li>
    <input type="text" placeholder="left">
  </li>
  <li class="text-area">
    <textarea placeholder="right"></textarea>
  </li>
  </ul>
</form>

Maybe there is a more quick solution but you can do that with bootstrap : 也许有一个更快的解决方案,但你可以用bootstrap做到这一点:

<form class="container">
<div class="col-5 row">
    <div class="col-6">
        <div class = "row">   
            <input type="text" placeholder="left">
        </div> 
        <div class="row mt-3">
            <input type="text" placeholder="left">
        </div>   
        <div class="row mt-3">
            <input type="text" placeholder="left">
        </div>   
        <div class="row mt-3">
            <input type="text" placeholder="left">    
        </div>      
    </div>
    <div class="col-3 ml-3">
        <div class = "row">       
            <input type="text" placeholder="left">
        </div> 
         <div class = "row mt-3 heightCSS">
            <textarea placeholder="right"></textarea>
        </div>
    </div>
</div>

CSS : CSS:

.heightCSS{
height: 8em;
width: 14em;

} }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM