# CSS background と conic-gradient で bookmark のブックマーク作る

CSS の発展は日進月歩!CSS の conic-gradient 関数使ってブックマーク図形を描きます。

html

<div class="bookmark"></div>

css

.bookmark {
  background: conic-gradient(
      from -45deg,
      currentColor 25%,
      currentColor 50%,
      transparent 50%,
      transparent 75%,
      currentColor 75%
    ) 50% 120% / 30% 80% no-repeat;
}

MDN Web Docs:background (opens new window)
MDN Web Docs:conic-gradient (opens new window)

2021-02-28
  • css

関連記事

Nuxt Fontawesome アイコン使う
シェアボタン SNS ソーシャルリンクの作り方
CSS ::-webkit-scrollbar スクロールバーをカスタマイズ
sass-loader エラー
HTML 特殊文字エンティティ参照
html5 新タグ要素と廃止タグ要素
safari でボタンタップしたら影が残る怪奇現象
css 学習 タイピング風アニメーションを css だけでやってみる
google color palette
フルスクリーン背景画像の 100%表示と iPhone 対応方法
css フルースクリンの背景画像と透けるログイン画面
placeholder text-align プレースホルダーの左寄せ・右寄せ
margin 上下効かない原因
CSS :before & :after pseudo-elements 疑似要素で画像を重ねる