Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the two practical properties of CSS3 and the skills of making web pages?

Shulou Source: shulou.com Published: 2022-06-01 10:30:03 10月04日 Update

This article mainly introduces the two practical attributes of CSS3 and what the web page making skills are, which can be used for reference by interested friends. I hope you can learn a lot after reading this article.

Our usual practice is to set a border for each menu item, and then set the border of the last menu to zero

But don't do this, use the: not () pseudo class to achieve the same effect:

Of course, you can also use .nav li + li or .nav li:first-child ~ li, but not () is clearer and readable

Use: nth-child (n) to select a project

(note: the subscript of the first child element is 1)

: nth-child (3) indicates the third element in the selection list

: nth-child (2n) represents an even number of tags in the list, that is, select 2nd, 4th, 6th. Label

: nth-child (2n-1) represents the odd tag in the selection list, that is, select 1st, 3rd, 5th, 7th... Label

: nth-child (nasty 3) indicates that the label in the selection list starts from the 3rd to the end (> = 3)

: nth-child (- naugh3) indicates that the tags in the selection list range from 0 to 3, that is, tags less than 3 (

Tags: Tags selection learning elements front end attributes articles skills web pages web page creation big reality production excellence stature methods conditions comments menus borders three Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Docker Microsoft Redmi Linux