- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
如何使用 :nth-child
运算符定位给定 DIV 内除第一个段落之外的所有段落?
:nth-child(/* select all but the first one */) {
color: green;
}
<div>
<p>Example 1</p>
<p>Example 2</p>
<p>Example 3</p>
<p>Example 4</p>
<p>Example 5</p>
<p>Example 6</p>
<p>Example 7</p>
</div>
最佳答案
您可以使用以下公式:
:nth-child(n+1)
或者对于某些浏览器:
:nth-child(n+2)
W3Schools 说:
Using a formula (an + b). Description: a represents a cycle size, n is a counter (starts at 0), and b is an offset value.
或者您可以为第一个元素使用单独的 :first-child
CSS 声明。
关于html - 如何用 nth-child 定位第一个元素以外的所有元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12193104/
我已经坚持了好几天了……很抱歉遇到这样的问题,但是我只是F#本身的初学者。由于关于类型提供程序的讨论很多,所以我决定建立一个类型提供程序并撰写一篇有关它的论文。当我开始时,我不知道什么是类型提供程序。
我正在开发LAN项目唤醒功能,但是我想控制局域网中计算机是否打开。但是我不想使用ICMP或WMI(我的网络上有DC)。那么,对于此问题,是否还有其他选择,例如“套接字连接”,请检查特定端口是否正在使用
我们有一个旧的VB6应用程序,该应用程序使用Crystal Reports XI生成打印报告。我们已经通过经验发现,如果Crystal Reports打印引擎选择了错误版本的 usp10.dll (W
我正在尝试获取有效的 Android 权限列表。我知道 http://developer.android.com/reference/android/Manifest.permission.html
嗨,我是 nginx 的新手,我试图在我的服务器(运行 Ubuntu 4)上设置它,它已经运行了 apache。 所以在我 apt-get install 它之后,我尝试启动 nginx。然后我收到这
如何在VB 6中检查对象的类型-除了'TypeName'之外,是否还有其他方法,因为无法通过'TypeName'进行检查,我希望使用类似QuichWatch窗口的方法。 最佳答案 对于对象变量,请使用
我的 JSP 应用程序中有一个错误。发布后我的 session 被清除: YAHOO.util.Connect.asyncRequest('POST', Url, callback, post
我是一名优秀的程序员,十分优秀!