Home  >  Article  >  Web Front-end  >  CSS 指定选择器(十一)_html/css_WEB-ITnose

CSS 指定选择器(十一)_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:46:001013browse

一、指定选择器

有时个会希望控制某个元素在一定范围内的对象样式,这时就可以把元素与Class或者Id选择器结合起来使用

指定选择器
这是个SPAN类名为CLASS这是个SPAN
这是个DIVID是TOP
这是个DIV

指定选择器对象定义样式限定为class或者id属性的某种元素非常有用,它对元素的控制精度介于标签选择器与id或者类选择器之间,是一种非常实用的选择器类型

如下面模块中如何控制新闻的正文

新闻标题

新闻正文

新闻说明

其它文件信息

css

div p.news{    font-size:18px;    color:#FF00FF;    }

或者

p.news{    font-size:18px;    color:#00FFFF;    }

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn