こんにちはみんなでこれら2つの境界を作るためにどのように、私はブロックのために、それらの境界をやろうとしています:後:擬似要素、ボタンの同じことの前に、私はそれに引っかかっ私はそれが何とか境界線の幅で行われる必要がありますね、それで私を助けることができる?
Q
擬似要素
0
A
答えて
2
共有画像のようなものを作成しました。あなたはこれまでに何をした?
.outer-section{
background:#fdefe0;
width:200px;
height:400px;
border: 1px solid #c7bcaf;
border-radius:8px;
position:relative;
margin:30px;
}
.outer-section:before {
position: absolute;
width: 0;
height: 0;
border-left: 100px solid transparent;
border-right: 100px solid transparent;
border-bottom: 5px solid #fdefe0;
content: "";
top: -4px;
z-index: 2;
}
.outer-section:after {
position: absolute;
width: 0;
height: 0;
border-left: 100px solid transparent;
border-right: 100px solid transparent;
border-bottom: 5px solid #c7bcaf;
content: "";
top: -5px;
z-index: 1;
}
.inner-section {
background: transparent;
height: 100%;
position: relative;
}
.inner-section:before {
position: absolute;
width: 0;
height: 0;
border-left: 100px solid transparent;
border-right: 100px solid transparent;
border-top: 5px solid #fdefe0;
content: "";
bottom: 1px;
z-index: 2;
}
.inner-section:after {
position: absolute;
width: 0;
height: 0;
border-left: 100px solid transparent;
border-right: 100px solid transparent;
border-top: 5px solid #c7bcaf;
content: "";
bottom: 0;
z-index: 1;
}
.white-bg {
background: #fff;
height: 350px;
margin: 5px;
}
.button-section {
background: #e88d1c;
position: relative;
margin: 5px;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
padding: 10px 0;
}
.button-section:before {
position: absolute;
width: 0;
height: 0;
border-left: 100px solid transparent;
border-right: 86px solid transparent;
border-top: 5px solid #e88d1c;
content: "";
bottom: -5px;
z-index: 2;
}
.button-innner {
background: #fff;
height: 10px;
width: 40%;
margin: auto;
}
<div class="outer-section">
<div class="inner-section">
<div class="white-bg">
</div>
<div class="button-section">
<div class="button-innner">
</div>
</div>
</div>
</div>
+0
こんにちは、solution.Btwのおかげでそれは同様に応答することは可能ですか? –
+0
はここで更新されたフィドルです。私は応答する私はパーセント形式で値を与えているhttps://fiddle.jshell.net/de23bsyy/ –
関連する問題
- 1. クリックスルー擬似要素
- 2. 擬似要素は
- 3. FadeOut擬似要素
- 4. ::擬似要素は
- 5. 擬似要素内の位置要素
- 6. 要素+要素アクセス不可:before擬似
- 7. :擬似要素はサファリ
- 8. スタイルの擬似要素
- 9. jQueryと擬似要素
- 10. 擬似要素と画像
- 11. 擬似要素のセンタリング
- 12. グローブブラケット擬似要素CSS
- 13. 擬似要素前/後
- 14. 類似::前と::後の擬似要素
- 15. 未知の擬似要素または擬似クラス:: selection [選択]
- 16. CSS3:入力後の擬似要素
- 17. 位置擬似要素の後に
- 18. input.submitにある擬似要素
- 19. 擬似要素のスタイル優先
- 20. 上の擬似要素のスタックの親
- 21. 擬似要素の問題のZ-インデックス
- 22. アニメーション用の擬似要素スタッキング
- 23. webkit-tap-highlight-color on擬似後要素
- 24. 擬似要素:垂直方向のインラインアラインメント
- 25. mootoolsで擬似要素を選択
- 26. 擬似要素の3D変換
- 27. CSS擬似要素のサイズの問題
- 28. リスト擬似要素の後には、
- 29. Chromeの擬似要素の前に
- 30. 角度:擬似要素のアニメーション:before、:after
...これはuのために働くことを願っていますかあなたのコードを私たちに教えてください。 –