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

背景の位置(background-position)を「右下起点」で値を指定する方法

Last updated at Posted at 2019-11-18

はじめに

「background-position」を設定するときに、右から〇px 下から〇pxで指定する方法。

内容

右下への指定はできるけど、値を入れて調整したい。。。

sample.css
background-posotino : left top; //初期値
background-posotino : 10px 10px; //左上起点の指定
background-posotino : right bottom; //右下

解決

方向+値で指定できるので、解決!

sample.css
background-posotino : right 10px bottom 10px; //右下起点の指定

対応ブラウザ

下記で確認してみてください。
https://caniuse.com/#feat=background-position-x-y

以上

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?