3
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.

[Qiita] 画像を中央寄せにする

Last updated at Posted at 2021-06-27

Qiitaでimgタグを使っても画像を中央寄せにしたい!

前提条件

  • imgタグで画像を貼り付けても大丈夫なとき
  • %を単位として画像を貼り付けても大丈夫なとき

方法

サイズを小さくするためにimgタグで画像を貼り付けている場合は、以下のように記述してみてください。

example
<img width=A%><img width=B% src="画像URL">

ただし、A = (100-B)/2とし、0 < B <= 100です。
また、1行で記述してください。

3
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
3
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?