How css uses the: not () selector to determine whether the form displays borders
This article mainly shows you the "css how to use: not () selector to determine whether the form displays the border", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use css: not () selector to determine whether the form shows the border" this article.
Use the: not () selector to determine whether the form displays borders
Add a border to the element first
/ * add a border * / .nav li {border-right: 1px solid # 666;}
Remove the border for the last element
/ * remove the border * / .nav li:last-child {border-right: none;}
But don't do this, use the: not () pseudo class to achieve the same effect:
.nav li:not (: last-child) {border-right: 1px solid # 666;}
Of course, you can also use .nav li + li, but: not () is clearer and readable.
This is all about the article "how css uses the not () selector to decide whether the form displays borders or not. Thank you for reading!" I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!