基本的なテキスト要素を含むdivを作成しようとしています。私の要件は、div内の要素はdivに従って整列する必要があります。したがって、私は相対的な位置にあるメインdivとの絶対的な位置付けを使用し、反応する画面で作業できるようにパーセンテージの値を与えました。私はメディアスクリーンのトップボトムのパーセンテージの一部を変更しました。ただし、画面サイズが変更された場合、テキストまたはdivの1ブロックが重複して表示されることがあります。応答画面でこの重複を避ける方法はありますか?事前にありがとう:)レスポンシブで絶対位置の重複を避ける
.Heading{
position:relative;
}
.Heading h3{
top:1%;
position:absolute;
left:0;
right:0;
}
.Text{
Position: absolute;
top: 10%;
}
.bottom-part{
position:absolute;
top:60%;
}
<div class="main">
<div class="Heading">
<h3>Heading part</h3>
</div>
<div class="Text">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It
has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div class="bottom-part">
<h4>Here's the ending part</h4>
</div>
</div>
なぜこのdivを「絶対」にしたのですか?単にこのfloat:left'プロパティを実行することができます –