0
0

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 3 years have passed since last update.

[CSS]チェックマーク作ってみた

Posted at

はじめに

以下のようにFontAwesomeで使えるマークに重なるチェックマークを実装したかったのでやってみました。

スクリーンショット 2021-06-28 22.42.56.png

やり方

枠線を使って表現していきます。

CSS
.check {
  width: 23px;
  height: 13px;
  border-left: 4px solid #25af01;
  border-bottom: 4px solid #25af01;
  transform: rotate(-45deg);
  position: absolute;
}

widthheightで長さを調整 border-leftborder-bottomで太さを調整しています。そしてtransformで角度調整して終わりです。

あとはHTMLに記述するだけです

HTML
<div id="check"></div><i class="fas fa-map-marker-alt respond-button "></i>

もし位置がずれているなどがあればtopleftなどを駆使して実装していければ良いと思います。

デザインのバリエーションとして使ってみてはいかがでしょうか

参考

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?