---
title: "css 选择器"
author: "ypfoo"
date: "2013-03-11T10:30:41Z"
tags: []
categories: ["Web前端"]
slug: "css"
draft: false
lastmod: "2013-03-11T10:30:41Z"
id: 1827348
url: "https://ypfoo.iteye.com/blog/1827348"
---

优先级从低到高 

 

基本选择器 

 

\*  星号是全部选择 

 

标签选择器       div {}

class 选择器    .class{}

id 选择器          #id{}

 

\--------------------------

 子元素选择器 

 

   div span  中间加空格

 

\--------------------------

 交叉选择器 -- 标签和class 的交叉

 

div.table           既是div标签，class又是 table 的元素

 

\--------------------------