css Get all elements starting from the nth one

css Get all elements starting from the nth one

The specific code is as follows:

<div id="box">
    <div></div>
    <div>Wait for acquisition</div>
    <div>Wait for acquisition</div>
    <div>Wait for acquisition</div>
</div>

Now we need to get all the divs in the box except the first one:

#box div:nth-of-type(n+2) {
    ...
}

The number after n is the number from which to start obtaining.

In this example, we start from the second div, so it is n+2.

Summarize

The above is the CSS that I introduced to you. Get all the elements starting from the nth one. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

<<:  Detailed example of concatenating multiple fields in mysql

>>:  Detailed explanation of Nginx's rewrite module

Recommend

Nested display implementation of vue router-view

Table of contents 1. Routing Configuration 2. Vue...

SpringBoot integrates Activiti7 implementation code

After the official release of Activiti7, it has f...

Detailed explanation of setting Context Path in Web application

URL: http://hostname.com/contextPath/servletPath/...

Nginx http health check configuration process analysis

Passive Check With passive health checks, NGINX a...

Pure CSS and Flutter realize breathing light effect respectively (example code)

Last time, a very studious fan asked if it was po...

Install Python 3.6 on Linux and avoid pitfalls

Installation of Python 3 1. Install dependent env...

JavaScript canvas implements graphics and text with shadows

Use canvas to create graphics and text with shado...

MySQL 5.7 installation-free configuration graphic tutorial

Mysql is a popular and easy-to-use database softw...

Detailed explanation of Vue's caching method example

Recently, a new requirement "front-end cache...

Summary of Linux file directory management commands

touch Command It has two functions: one is to upd...

When to use table and when to use CSS (experience sharing)

The main text page of TW used to have a width of 8...

VMware virtual machine installation CentOS 8 (1905) system tutorial diagram

The world-famous virtual machine software VMware-...

JavaScript plugin encapsulation for table switching

This article shares the encapsulation code of Jav...