码迷,mamicode.com
首页 > Web开发 > 详细

12_css选择符类型3.html

时间:2015-06-01 20:49:11      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:12_css选择符类型3.html


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title>css选择符类3_类选择符</title>


<style type="text/css">

.warning{

font-size:36px;

color:#FFFF33;

}

</style>


</head>


<body>


<div class="warning">

1.标签选择符:就是针对HTML文档中的标签(哪些HTML标签应用哪些CSS样式)

</div>


<p class="warning">

2.id选择符:比如有很多p标签,但是只想要其中的某一个p标签用到CSS,那么就在p标签内定义id属性,再在head内加入style中CSS,如:#two{font-size:36px;}

</p>


<input type="text" class="warning" size="100" value="3.类选择符:可以自己定义样式,应用于一个或多个网页元素,如: .warning{属性:值} " />



</body>

</html>


12_css选择符类型3.html

标签:12_css选择符类型3.html

原文地址:http://1154179272.blog.51cto.com/10217799/1657183

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!