LoginSignup
3

More than 5 years have passed since last update.

#liタグ等で最後の要素を除外する

Posted at

.notセレクタを使用して一行で書く方法。

li:not(:last-child) {border-bottom:1px #000 solid;}

これで一番最後のli以外にボーダーが設定される。

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