0

这就是我到目前为止所拥有的 https://codepen.io/homayounj/pen/rNyqOKM?editors=1100

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@200&display=swap');


html {
  font-size: 1rem;
  font-family: 'Raleway', sans-serif;
  line-height: 40px;
  background-image:  linear-gradient( rgba(255, 0, 0, 0.45), rgba(1,1,0,.0)), url(https://cdn.freecodecamp.org/testable-projects-fcc/images/survey-form-background.jpeg);
  background-attachment: fixed;
  margin: 25rem;

}

body{
  color: white;
  background-color: rgba(107, 137, 97, 0.7);



}
 @media (max-width: 900px) {
    body{
  color: white;
  background-color: rgba(107, 137, 97, 0.7);

  margin: auto;
  padding: 0.5rem;
  }


}

.top-inputs {

  width: 80%;
}

#comment {
  height: 4rem;
}

基本上,我希望正文的内容与左侧对齐,但也集中在绿色背景上。

与此类似: https ://codepen.io/freeCodeCamp/pen/VPaoNP

无论我做什么,右边的填充总是比其他的大,我已经尝试了我能想到的一切。

4

0 回答 0