第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何將矩形 div 放在 Flex 空間上?

如何將矩形 div 放在 Flex 空間上?

慕俠2389804 2024-01-18 14:30:17
我希望 div 矩形也將列在提供的空間上。我在 .education 上使用了 display flex,這樣另一個 div 將位于 education 的一側(cè),但是如果我將另一個矩形 div 附加在 2 個矩形的底側(cè),它就會位于一側(cè)。請原諒我的英語。我怎樣才能做到這一點?請幫助我提前謝謝你!<main> <div class="wrapper-body-resume"><div class="header-resume"><div class="GP"></div><div class="name-left"><h1>Aljo</h1><p style=" color: white"><i><b>logy</b></i></p><p style=" color: white">Contac +39</p><hr><p><i>"Th</i></p><p><i>-Colin Powell</i></p></div></div><div class="body-resume"><div class="about">    <h1>About me</h1>    <p>I .</p></div><div class="column1"><div class="education">    <h1>Education</h1>    <p><b><u>Elementary</u></b></p>    <p><i><b>Sool</b></i><br>An9)</p>    <p><i><b>Scia</b></i><br>P11)</p>    <p><b><u>High School</u></b></p>    <p><i><b>Hemy</b></i><br>An 2012)</p>    <p><i><b>Frol</b></i><br>Po4)</p>    <p><i><b>Ju</b></i><br>C 2015)</p>    <p><b><u>College</u></b></p>    <p><i><b>Uninan</b></i><br>C5 - 2019)</p></div><div class="personalinfo">    <h1>Personal Info</h1>    <p></div><div class="workexper"></div></div><div class="cert"></div></div></div></main>
查看完整描述

3 回答

?
慕運維8079593

TA貢獻1876條經(jīng)驗 獲得超5個贊

您需要將這兩個 div 放入另一個 div 中。因此,包含工作經(jīng)驗和個人信息的 div 將顯示為相對于它們所在的 Flex div 的塊。我已附上示例代碼和修復程序。


.resume-body {

      background-color: #1f2021;

    }


    .wrapper-body-resume {

      width: 100%;

      height: 100%;

      display: flex;

      flex-direction: column;

    }


    /* Header */

    .header-resume {

      font-family: Arial;

      box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

      background-repeat: no-repeat;

      margin: 0;

      position: relative;

      width: 100%;

      height: 350px;

      z-index: 1;

      box-sizing: border-box;

      display: flex;

      flex-direction: row-reverse;

      background: linear-gradient(to right, rgb(46, 46, 46), rgb(0, 0, 0));

    }

    .GP {

      background: url(../Resources/Aljon-GP.png);

      width: 100%;

      height: 500px;

      background-size: contain;

      background-repeat: no-repeat;

      bottom: 150px;

      left: 400px;

      position: relative;

    }


    .name-left {

      text-align: center;

      box-sizing: border-box;

      justify-content: center;

      width: 50%;

      height: 100%;

      padding: 80px 0 0 0;

      margin: 0;

      left: 300px;

      position: relative;

    }

    .name-left h1 {

      line-height: 0;


      font-size: 30px;

      color: #ffffff;

    }

    .name-left p {

      color: #999999;

    }

    .body-resume {

      width: 100%;

      padding: 10px 20px;

      box-sizing: border-box;

      background-color: rgb(255, 255, 255);

    }


    .about {

      padding: 5px;

      margin: 10px;

      font-family: Arial;

      box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

    }

    .about h1 {

      padding: 10px;

      margin: 5px;

      font-size: 20px;

      font-family: Arial;

      color: #1f2021;

    }

    .about p {

      padding: 10px;

      margin: 5px;

      font-size: 16px;

      font-family: Arial;

      font-style: italic;

    }


    .personalinfo {

      padding: 5px;

      margin: 10px;

      font-family: Arial;

      width: 150px;

      height: 500px;

      box-sizing: border-box;

      box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

    }

    .personalinfo h1 {

      padding: 10px;

      margin: 5;

      font-size: 20px;

      font-family: Arial;

      color: #1f2021;

    }

    .personalinfo p {

      padding: 10px;

      margin: 5px;

      font-size: 16px;

      font-family: Arial;

      font-style: italic;

    }

    .column1 {

      display: flex;

      flex: row;

    }

    .education {

      padding: 5px;

      margin: 10px;

      width: 30%;

      box-sizing: border-box;

      box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

      display: flex;

      flex-direction: column;

    }

    .education h1 {

      padding: 10px;

      margin: 5;

      font-size: 20px;

      font-family: Arial;

      color: #1f2021;

    }


    .education p {

      padding: 10px;

      margin: 5px;

      font-size: 16px;

      font-family: Arial;

      font-style: italic;

    }

    .workexper {

      padding: 5px;

      margin: 10px;

      font-family: Arial;

      width: 150px;

      height: 500px;

      box-sizing: border-box;

      box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

    }

    .cert {

      padding: 5px;

      margin: 10px;

      font-family: Arial;

      width: 50%;

      height: 500px;

      box-sizing: border-box;

      box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

    }

<main> 

    <div class="wrapper-body-resume">


    <div class="header-resume">

    <div class="GP"></div>

    <div class="name-left">

    <h1>Aljo</h1>

    <p style=" color: white"><i><b>logy</b></i></p>

    <p style=" color: white">Contac +39</p>

    <hr>

    <p><i>"Th</i></p>

    <p><i>-Colin Powell</i></p>

    </div>

    </div>


    <div class="body-resume">

    <div class="about">

        <h1>About me</h1>

        <p>I .</p>

    </div>

    <div class="column1">

    <div class="education">

        <h1>Education</h1>

        <p><b><u>Elementary</u></b></p>

        <p><i><b>Sool</b></i><br>An9)</p>

        <p><i><b>Scia</b></i><br>P11)</p>


        <p><b><u>High School</u></b></p>

        <p><i><b>Hemy</b></i><br>An 2012)</p>

        <p><i><b>Frol</b></i><br>Po4)</p>

        <p><i><b>Ju</b></i><br>C 2015)</p>


        <p><b><u>College</u></b></p>

        <p><i><b>Uninan</b></i><br>C5 - 2019)</p>


    </div>

    <div class="flex-container">

      <div class="personalinfo">

          <h1>Personal Info</h1>

          <p>

      </div>

      <div class="workexper">

      </div>

    </div>



    </div>

    <div class="cert">

    </div>

    </div>


    </div>

    </main>


查看完整回答
反對 回復 2024-01-18
?
千巷貓影

TA貢獻1829條經(jīng)驗 獲得超7個贊

CSS-Grid被證明是使用簡潔代碼實現(xiàn)此類布局的強大工具。一旦您應用 @media 查詢在小屏幕上運行您的應用程序,這就是一個非常方便的工具,因為這不遵循順序。我們可以將網(wǎng)格項放置在網(wǎng)格上的任何位置。


這是演示。


.resume-body {

  background-color: #1f2021;

}


.wrapper-body-resume {

  width: 100%;

  height: 100%;

  display: flex;

  flex-direction: column;

}


/* Header */

.header-resume {

  font-family: Arial;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

  background-repeat: no-repeat;

  margin: 0;

  position: relative;

  width: 100%;

  height: 350px;

  z-index: 1;

  box-sizing: border-box;

  display: flex;

  flex-direction: row-reverse;

  background: linear-gradient(to right, rgb(46, 46, 46), rgb(0, 0, 0));

}

.GP {

  background: url(../Resources/Aljon-GP.png);

  width: 100%;

  height: 500px;

  background-size: contain;

  background-repeat: no-repeat;

  bottom: 150px;

  left: 400px;

  position: relative;

}


.name-left {

  text-align: center;

  box-sizing: border-box;

  justify-content: center;

  width: 50%;

  height: 100%;

  padding: 80px 0 0 0;

  margin: 0;

  left: 300px;

  position: relative;

}

.name-left h1 {

  line-height: 0;


  font-size: 30px;

  color: #ffffff;

}

.name-left p {

  color: #999999;

}

.body-resume {

  width: 100%;

  padding: 10px 20px;

  box-sizing: border-box;

  background-color: rgb(255, 255, 255);

}


.about {

  padding: 5px;

  margin: 10px;

  font-family: Arial;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

}

.about h1 {

  padding: 10px;

  margin: 5px;

  font-size: 20px;

  font-family: Arial;

  color: #1f2021;

}

.about p {

  padding: 10px;

  margin: 5px;

  font-size: 16px;

  font-family: Arial;

  font-style: italic;

}


.column1 {

  display: grid;

  grid-template-columns: repeat(8, 1fr);

  grid-template-rows: repeat(5, 125px);

  gap: 0.5rem;

}

.education {

  padding: 5px;

  margin: 10px;

  box-sizing: border-box;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

  display: flex;

  flex-direction: column;

  grid-column: 1/3;

  grid-row: 1/6;

}

.education h1 {

  padding: 10px;

  margin: 5;

  font-size: 20px;

  font-family: Arial;

  color: #1f2021;

}


.education p {

  padding: 10px;

  margin: 5px;

  font-size: 16px;

  font-family: Arial;

  font-style: italic;

}


.personalinfo {

  padding: 5px;

  margin: 10px;

  font-family: Arial;

  height: 500px;

  box-sizing: border-box;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

  grid-column: 3/5;

}

.personalinfo h1 {

  padding: 10px;

  margin: 5;

  font-size: 20px;

  font-family: Arial;

  color: #1f2021;

}

.personalinfo p {

  padding: 10px;

  margin: 5px;

  font-size: 16px;

  font-family: Arial;

  font-style: italic;

}

.workexper {

  padding: 5px;

  margin: 10px;

  font-family: Arial;

  height: 500px;

  box-sizing: border-box;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

  grid-column: 5/9;

}

.cert {

  padding: 5px;

  margin: 10px;

  font-family: Arial;

  width: 50%;

  height: 500px;

  box-sizing: border-box;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

  grid-column: 3/9;

  grid-row: 5/6;

}

<!DOCTYPE html>

<html>

  <head>

    <meta charset="UTF-8" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <title>Document</title>

    <link rel="stylesheet" href="./style.css" />

  </head>

  <body>

    <main>

      <div class="wrapper-body-resume">

        <div class="header-resume">

          <div class="GP"></div>

          <div class="name-left">

            <h1>Aljo</h1>

            <p style="color: white">

              <i><b>logy</b></i>

            </p>

            <p style="color: white">Contac +39</p>

            <hr />

            <p><i>"Th</i></p>

            <p><i>-Colin Powell</i></p>

          </div>

        </div>


        <div class="body-resume">

          <div class="about">

            <h1>About me</h1>

            <p>I .</p>

          </div>

          <div class="column1">

            <div class="education">

              <h1>Education</h1>

              <p>

                <b><u>Elementary</u></b>

              </p>

              <p>

                <i><b>Sool</b></i

                ><br />An9)

              </p>

              <p>

                <i><b>Scia</b></i

                ><br />P11)

              </p>


              <p>

                <b><u>High School</u></b>

              </p>

              <p>

                <i><b>Hemy</b></i

                ><br />An 2012)

              </p>

              <p>

                <i><b>Frol</b></i

                ><br />Po4)

              </p>

              <p>

                <i><b>Ju</b></i

                ><br />C 2015)

              </p>


              <p>

                <b><u>College</u></b>

              </p>

              <p>

                <i><b>Uninan</b></i

                ><br />C5 - 2019)

              </p>

            </div>

            <div class="personalinfo">

              <h1>Personal Info</h1>

              <p></p>

            </div>


            <div class="workexper"></div>

            <div class="cert"></div>

          </div>

        </div>

      </div>

    </main>

  </body>

</html>


注意: HTML 文件中的主要更改是,我還將最后一個 div 放入了class="cert"網(wǎng)格容器本身中。


查看完整回答
反對 回復 2024-01-18
?
慕神8447489

TA貢獻1780條經(jīng)驗 獲得超1個贊

.resume-body {

  background-color: #1f2021;

}


.wrapper-body-resume {

  width: 100%;

  height: 100%;

  display: flex;

  flex-direction: column;

}


/* Header */

.header-resume {

  font-family: Arial;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

  background-repeat: no-repeat;

  margin: 0;

  position: relative;

  width: 100%;

  height: 350px;

  z-index: 1;

  box-sizing: border-box;

  display: flex;

  flex-direction: row-reverse;

  background: linear-gradient(to right, rgb(46, 46, 46), rgb(0, 0, 0));

}

.GP {

  background: url(../Resources/Aljon-GP.png);

  width: 100%;

  height: 500px;

  background-size: contain;

  background-repeat: no-repeat;

  bottom: 150px;

  left: 400px;

  position: relative;

}


.name-left {

  text-align: center;

  box-sizing: border-box;

  justify-content: center;

  width: 50%;

  height: 100%;

  padding: 80px 0 0 0;

  margin: 0;

  left: 300px;

  position: relative;

}

.name-left h1 {

  line-height: 0;


  font-size: 30px;

  color: #ffffff;

}

.name-left p {

  color: #999999;

}

.body-resume {

  width: 100%;

  padding: 10px 20px;

  box-sizing: border-box;

  background-color: rgb(255, 255, 255);

}


.about {

  padding: 5px;

  margin: 10px;

  font-family: Arial;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

}

.about h1 {

  padding: 10px;

  margin: 5px;

  font-size: 20px;

  font-family: Arial;

  color: #1f2021;

}

.about p {

  padding: 10px;

  margin: 5px;

  font-size: 16px;

  font-family: Arial;

  font-style: italic;

}


.personalinfo {

  padding: 5px;

  margin: 10px;

  font-family: Arial;

  width: 22%;

  height: 500px;

  box-sizing: border-box;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

}

.personalinfo h1 {

  padding: 10px;

  margin: 5;

  font-size: 20px;

  font-family: Arial;

  color: #1f2021;

}

.personalinfo p {

  padding: 10px;

  margin: 5px;

  font-size: 16px;

  font-family: Arial;

  font-style: italic;

}

.column1 {

  display: flex;

  flex: row;

}

.education {

  padding: 5px;

  margin: 10px;

  width: 30%;

  box-sizing: border-box;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

  display: flex;

  flex-direction: column;

}

.education h1 {

  padding: 10px;

  margin: 5;

  font-size: 20px;

  font-family: Arial;

  color: #1f2021;

}


.education p {

  padding: 10px;

  margin: 5px;

  font-size: 16px;

  font-family: Arial;

  font-style: italic;

}

.workexper {

  padding: 5px;

  margin: 10px;

  font-family: Arial;

  width: 100%;

  height: 500px;

  box-sizing: border-box;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

}

.cert {

  padding: 5px;

  margin: 10px;

  font-family: Arial;

  width: 50%;

  height: 500px;

  box-sizing: border-box;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

}

<main> 

<div class="wrapper-body-resume">


<div class="header-resume">

<div class="GP"></div>

<div class="name-left">

<h1>Aljo</h1>

<p style=" color: white"><i><b>logy</b></i></p>

<p style=" color: white">Contac +39</p>

<hr>

<p><i>"Th</i></p>

<p><i>-Colin Powell</i></p>

</div>

</div>


<div class="body-resume">

<div class="about">

    <h1>About me</h1>

    <p>I .</p>

</div>

<div class="column1">

<div class="education">

    <h1>Education</h1>

    <p><b><u>Elementary</u></b></p>

    <p><i><b>Sool</b></i><br>An9)</p>

    <p><i><b>Scia</b></i><br>P11)</p>


    <p><b><u>High School</u></b></p>

    <p><i><b>Hemy</b></i><br>An 2012)</p>

    <p><i><b>Frol</b></i><br>Po4)</p>

    <p><i><b>Ju</b></i><br>C 2015)</p>


    <p><b><u>College</u></b></p>

    <p><i><b>Uninan</b></i><br>C5 - 2019)</p>


</div>

<div class="personalinfo">

    <h1>Personal Info</h1>

    <p>

</div>

<div class="workexper">

</div>


<div class="cert"> <!--I have moved this into your column div!-->

</div>


</div>

</div>


</div>

</main>


您只需將“cert”div 移動到“column”div 中,因為您在列上顯示了 flex


查看完整回答
反對 回復 2024-01-18
  • 3 回答
  • 0 關(guān)注
  • 185 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號