我需要將段落div移到左側,並一直展開到圖片。頂部div應該顯示在兩行上,並在節日之後打破。這兩段應該在圖像的左側。如何讓div正確顯示?如何調整divs?
body {
width: 8.5in;
}
.container {
display: flex;
background: red;
}
.top-div {
display: table;
background: rgb(204, 255, 102);
text-align: center;
font-size: 1.75em;
font-weight: bold;
color: rgb(35, 66, 113);
}
.top-div>p {
margin: 10px;
}
.paragraph {
align-self: flex-end;
background: blue;
}
.flower-img {
display: table;
float: left;
}
<div class="container">
<div class="top-div">
<p lang="zh">Qingming Festival<br>qīng míng jié</p>
</div>
<div class="paragraph">
<p>The Qingming or Ching Ming Festival, also known as Tomb-Sweeping Day in English, is a traditional Chinese festival on the first day of the fifth solar term of the traditional Chinese lunisolar calendar. This makes it the 15th day after the Spring
Equinox, either 4 or 5 April in a given year. Other common translations include Chinese Memorial Day and Ancestors' Day.</p>
<p>It is also a time for people to go outside to enjoy the spring such as having a picnic or flying a kite. In 2017 Qingming Festival falls on April 4. The three-day public holiday in China is April 3–5, 2017.</p>
</div>
<div>
<img src="//dummyimage.com/300x450" alt="flower" width="300" class="flower-img">
</div>
</div>
ü可以添加它如何顯示您的屏幕截圖。我沒有看到你的輸出有任何問題,它顯示罰款每個問題 –
你有一個錯字,「dsiplay」 – Rob
@Rob我刪除了代碼與排字 – BrianC987