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

よく使うcss

Last updated at Posted at 2021-04-13

要素にそれっぽい影をつける

XDのデフォルトの値でデザイナーがこのままの値を使う

box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);

flexの横並びスクロール

スクロールバー非表示と、末尾に余白用の擬似要素を追加するのがポイント

  ul {
    display: flex;
    flex: 1;
    overflow-x: scroll;
    white-space: nowrap;
    &::-webkit-scrollbar {
      display: none;
    }
    li {
      margin-left: 8px;
      display: inline-block;
      &:first-of-type {
        margin-left: 16px;
      }
      &:last-of-type {
        position: relative;
        &::after {
          position: absolute;
          top: 0;
          left: 100%;
          width: 16px;
          height: 1px;
          content: '';
        }
      }
    }
  }

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?