【问题标题】:text area not filling in div [closed]文本区域未填充 div [关闭]
【发布时间】:2019-12-20 14:13:49
【问题描述】:

我有一个主要的container 类,里面有两个容器。底部容器还包含两个容器,分别是左侧和右侧textbox。我想用 textarea 填充这两个文本框,但是,它不会呈现。我需要对我的 CSS 进行哪些更改?

谢谢,这是我的代码:

App.js

class App extends React.Component {
  render() {
    return (
      <div className="screenDiv">
        <div className="topContainer">
          <div className="textContainer">
            <div className="textBoxes">
              <div className="leftTextBox">
                <textarea className="textarea" />
              </div>
              <div className="rightTextBox">
                <textarea className="textarea" />
              </div>
            </div>

            <div className="languageDisplay">
              <div className="inputLanguage">
                <p>English</p>
              </div>
              <div className="outputLanguage">
                <p>Spanish</p>
              </div>
            </div>
          </div>
        </div>
      </div>
    );
  }
}

export default App;

App.css

.screenDiv {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
}

.topContainer {
  height: 80%;
}

.botContainer {
  height: 20%;
  border-top: 1px solid black;
}

.topContainer,
.botContainer,
.textBoxes,
.languageDisplay {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.textBoxes {
  height: 50%;
  position: relative;
  top: 50%;
  border-top: 1px solid #161515;
  border-left: none;
  display: flex;
}

.textContainer {
  width: 80%;
  height: 36%;
  position: relative;
  top: 30%;
  left: 10%;
  right: 20%;
  border: 1px solid #161515;
  display: flex;
  justify-content: space-between;
  border-radius: 3%;
}

.languageDisplay {
  height: 50%;
  position: absolute;
  top: 0%;
  bottom: 50%;
  display: flex;
  justify-content: space-between;
}

.inputLanguage {
  width: 5%;
  height: 20%;
  position: relative;
  top: 30%;
  left: 20%;
}

.outputLanguage {
  width: 5%;
  height: 20%;
  position: relative;
  top: 30%;
  right: 20%;
}

.leftTextBox,
.rightTextBox {
  width: 50%;
  height: 100%;
  display: inline-block;
  border: 1px solid #100f0f;
  border-right: none;
  border-bottom: none;
}

.leftTextBox {
  border-left: none;
}

.textarea {
  height: 100%;
  width: 100%;
  resize: none;
}

【问题讨论】:

    标签: css reactjs


    【解决方案1】:

    你拼错了textarea。你写了texarea,缺少第二个t

    【讨论】:

    • 哎呀好尴尬
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-21
    • 1970-01-01
    • 2011-03-16
    • 1970-01-01
    • 2017-06-17
    相关资源
    最近更新 更多