0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

cssだけで矢印を作ってみる

Posted at

cssだけで矢印を作るのが、意外と簡単だったのでやってみました。

<div></div>
/**
 * 上向きの矢印を作ってみる
 * 幅を持ったborderを用意して、border-bottom以外の色を背景透過にするばOK
 */
div {
    width: 0px;
    border-color: black;
    border-style: solid;
    border-width: 30px;
    border-left-color: transparent;
    border-top-color: transparent;
    border-right-color: transparent;
}

こんな感じになります。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?