Css 将屏幕分为两个不同宽度的部分

Css 将屏幕分为两个不同宽度的部分,css,html,Css,Html,我试图将页面分成两部分,但大小不同。 使用下面的代码,我得到了两个部件,但大小相同 html部分是: <div class="split left"> <div class="centered"> <h2>Jane Flex</h2> <p>Some text.</p> </div> </div> <div class="split right"> &l

我试图将页面分成两部分,但大小不同。 使用下面的代码,我得到了两个部件,但大小相同

html部分是:

<div class="split left">
  <div class="centered">
      <h2>Jane Flex</h2>
    <p>Some text.</p>
  </div>
</div>

<div class="split right">
  <div class="centered">
    <h2>John Doe</h2>
    <p>Some text here too.</p>
  </div>
</div>
有可能吗? 提前感谢

类中删除
宽度:50%
。拆分
类。并向
.left
.right
类添加宽度属性(任意)

/* Control the left side */
.left {
  left: 0;
  background-color: orange;
  width: 30%;
}

/* Control the right side */
.right {
  right: 0;
  background-color: red;
  width: 70%;
}

谢谢我是否可以删除其中一个部分中的垂直滚动条而不删除另一个部分中的垂直滚动条?谢谢again@PeterPam对将
overflow-y:hidden
添加到
.left
.right
/* Control the left side */
.left {
  left: 0;
  background-color: orange;
  width: 30%;
}

/* Control the right side */
.right {
  right: 0;
  background-color: red;
  width: 70%;
}