.post { border-bottom: 1px solid black; }
.post:nth-child(2n) { background-color: #DDD; }
.post:last-of-type { border-bottom: none; }
<div>
<div class="post">This is post 1.</div>
<div class="post">This is post 2.</div>
<div class="post">This is post 3.</div>
<div id="last">This is not a post! This is the last element here.</div>
</div>
私はポスト3と最後の要素の間に境界線を削除します。
しかし、あなたの最後の型divがあなたのスクリーンショットごとにIDないクラスで示し.. – vignesh
確かに...あなたが、「クラスの最後」の後にあることが表示されます。..それが存在しない、 –
最後のタイプの仕事をするには、この場合divのようなdiv.class:最後の....どのようなタイプを知らせなければならない –