首页 >

css中筛选框 |css3倒数第二个

提高css速度,css动画火狐兼容,dw如何打开css面板,div css上中下 布局,jq修改css伪元素属性,css3 动画 旋转中心,css3倒数第二个css中筛选框 |css3倒数第二个

下面是一些常用的筛选框:

/* 指定元素 */
p {
color: red;
}
/* 指定类名 */
.my-class {
font-weight: bold;
}
/* 指定ID */
#my-id {
text-align: center;
}
/* 指定属性 */
a[href="https://www.google.com"] {
color: blue;
}
/* 选择子元素 */
div p {
font-size: 16px;
}
/* 选中第一个子元素 */
li:first-child {
color: green;
}
/* 选中倒数第二个子元素 */
li:nth-last-child(2) {
color: pink;
}
/* 选中每个偶数元素 */
li:nth-child(even) {
background-color: lightgray;
}

以上示例代码只是CSS中一小部分的筛选框,还有更多的选择器可以根据需要进行学习和使用。


css中筛选框 |css3倒数第二个
  • css前5个选择器 |让ie8支持css3
  • css前5个选择器 |让ie8支持css3 | css前5个选择器 |让ie8支持css3 ...

    css中筛选框 |css3倒数第二个
  • css禁止文章复制 |css 斜角
  • css禁止文章复制 |css 斜角 | css禁止文章复制 |css 斜角 ...

    css中筛选框 |css3倒数第二个
  • css实现矩形的框凹进去 |css3 inset
  • css实现矩形的框凹进去 |css3 inset | css实现矩形的框凹进去 |css3 inset ...