ホームページ >ウェブフロントエンド >htmlチュートリアル >css_html/css_WEB-ITnoseで三角形を作る
#triangle-up {
width: 0;
height: 0;
border-left: 50px ソリッド透明;
border-right: 50px ソリッド透明;
border-bottom: 100px ソリッドred;
}
#triangle-down {
width: 0;
高さ: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-top: 100ピクセルの赤一色;
}
#triangle-left {
width: 0;
height: 0;
border-top: 50px 単色透明;
border-right: 100px 単色赤;
border-bottom: 50px 単色透明;
}
#triangle-right {
width: 0;
height: 0;
border-top: 50px ソリッド透明;
border-left: 100px ソリッドレッド;
border-bottom: 50px ソリッド透明;
}
#triangle-topleft {
width: 0;
height: 0;
border-top: 100px 単色赤;
border-right: 100px 単色透明;
}
#triangle-topright {
幅: 0;
高さ: 0;
border-top: 100px 単色赤;
border-left: 100px 単色透明;
}
#triangle-bottomleft {
幅: 0;
高さ: 0;
border-bottom: 100px ソリッドレッド;
border-right: 100px ソリッド透明;
}
#triangle-bottomright {
width: 0;
高さ: 0;
border-bottom: 100px ソリッドレッド;
border-左: 100 ピクセルの単色透明;
}