-2
A
答えて
2
は、いくつかのカスタムスタイルを追加します。
.container{
position: relative;
}
.row{ /* for visual purpose */
border: 1px solid black;
padding: 20px 0;
margin: 20px 0;
}
.container>div:first-of-type{
position: absolute;
top: -10px;
left: 20px;
height: 50px;
width: 50px;
z-index:10;
}
.container>div:nth-of-type(4){
position: absolute;
top: 10px;
right: 20px;
bottom : 10px;
width: 50px;
z-index:10;
}
@media (max-width: 768px){ /* reset the custom styles on mobile */
.container>div:first-of-type, .container>div:nth-of-type(4){
position: static;
width: 100%;
}
}
を3210
+0
ありがとう...私はそれを試してみます。 – Nere
0
あなたがここにブートストラップする必要はありません。デスクトップレイアウトに
CSS
.row {
position: relative;
}
.first-div {
position: absolute;
left: 30px;
top: -10px;
width: 150px;
height: 250px;
}
.fourth-div {
position: absolute;
right: 10px;
top: 10px;
width: 150px;
height: 600px;
}
、モバイルビューにHTMLで
.first-div {
position: static;
width: 100%;
height: 300px;
}
.fourth-div {
position: static;
width: 100%;
height: 300px;
}
を適用を適用します。
<div class="row">
<div class="first-div"></div>
<div class="second-div"></div>
<div class="third-div"></div>
<div class="fourth-div"></div>
</div>
関連する問題
- 1. レスポンシブ部門の再調整の問題
- 2. センター部門部門
- 3. テーブルの部門
- 4. 部門
- 5. 内部部門のグレースケール
- 6. 他の部門にオーバーフローする
- 7. 別の部門内の最初の部門を選択
- 8. 別の部門の上に私の部門を表示
- 9. Divのオーバーレイ部門
- 10. C++の部門エラー?
- 11. センター部門
- 12. kotlin部門
- 13. センターイメージ部門内
- 14. SQL:各部門
- 15. IE6フルスクリーン部門
- 16. ジャンゴF()部門 -
- 17. パンダ行賢明部門
- 18. 4つのサブ部門を持つヘッド部門
- 19. すべての部門を自動クリックする部門ID
- 20. CSS3の部門の高さ
- 21. 私のロゴ部門のセンタリング
- 22. 特定の部門のページスクラップ
- 23. 関係部門クエリ
- 24. Jquery SlideToggle別の部門
- 25. 親部門の中断
- 26. 別の部門からリダイレクト
- 27. エンティティフレームワークリレーショナル部門の実装
- 28. Javascriptの無限部門
- 29. 部門のスナップショットを取る
- 30. ADコンピュータオブジェクトの部門フィールド?
あなたは何を試しましたか?あなたの現在のHTMLは何ですか? – Justinas