ToolPal

CSS三角形ジェネレーター

borderトリックを使って純粋なCSSで三角形を生成します。方向、サイズ、色を選んで、CSSをすぐにコピーできます。

CSS三角形はborderトリックを利用します。サイズが0の要素の3辺を透明にし、1辺だけ単色にすると三角形ができあがります。SVGや画像は不要です。

使い方

borderトリックを使って純粋なCSSで三角形を生成します。方向、サイズ、色を選んで、CSSをすぐにコピーできます。

  1. 1Pick the triangle direction — up, down, left, right, or a corner direction for right triangles.
  2. 2Drag the width and height sliders to set the triangle's size in pixels.
  3. 3Choose a color using the color picker or by typing a hex value.
  4. 4Watch the live preview update on a checkered background so transparent borders are visible.
  5. 5Click 'Copy' to copy the generated CSS class to your clipboard and paste it into your stylesheet.

主な機能

  • Eight directions — four cardinal (up/down/left/right) and four corner-anchored right triangles
  • Live preview on checkered background — confirms which borders are transparent and which are colored
  • Independent width and height — sliders go up to 400px for both dimensions
  • Pure-CSS output — no SVG, no images, no JavaScript runtime; just borders on a zero-size element
  • Color picker plus hex input — choose visually or paste an exact brand color

よくある質問

詳しく読む