LoginSignup
0
1

border-radius 長方形+半円の作り方

Posted at

長方形+半円の作り方で忘れないための備考録

.rectangle {
    border-radius: 9999px;
}

上記でもいいが、9999pxというのは嫌なので、
以下書き方でも長方形+半円のデザインが実現可能。

.rectangle {
    border-radius: calc(Infinity * 1px); // calc(1px / 0)
}
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