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

CSS3のtext-shadowだけで文字に太い枠線をつける方法。

Last updated at Posted at 2020-06-15

#CSS3のtext-shadowだけで文字に太い枠線をつける方法。

ありそうでなかったので、CSSのtext-shadowだけで文字をぼかしなしのソリッドに太く縁取りする方法を模索してみました。
h1からh3くらいの大きさを想定。
アルファベットや丸みを帯びたフォントを使用すると精度が上がります。
フォントサイズによって値は変更してみてください。

h1{
text-shadow:
 white 3px 0px,
 white -3px 0px,
 white 0px -3px,
 white -3px 0px,
 white 3px 3px,
 white -3px 3px,
 white 3px -3px,
 white -3px -3px,
 white 1px 3px,
 white -1px 3px,
 white 1px -3px,
 white -1px -3px,
 white 3px 1px,
 white -3px 1px,
 white 3px -1px,
 white -3px -1px,
 white 1px 1px,
 white -1px 1px,
 white 1px -1px,
 white -1px -1px;
}
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?