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.

box-shadow 上だけ消す

Posted at

疑似要素で重ねるのはデザイン的に向いてなさそうなケースがあるので、重ねて指定する方法でどうだろう

style.css
    box-shadow: 0px 10px 7px -7px rgba(0,0,0,0.1),
                7px 7px 7px -7px rgba(0,0,0,0.1); /* 上だけ出さない、左右と下を陰つける */

一応見本。上側に複雑なパーツが乗っても大丈夫そう。
image.png

上のタブ部分はざっくりとbox-shadowかけただけなので、タブ部分要素の下側のshadowは直後の本文エリア要素の裏側に回ってるだけだと思う。

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?