CSS选择器

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>CSS样式</title>
		<link rel="stylesheet" href="css/index.css" />
		<style>
			span{
				color: blueviolet;
				font-family: "comic sans ms";
			}
		</style>
	</head>
	<body>
		<span>河南工业大学</span>
		<span>What are you doing?</span>
		<div id="hgd">河南工业大学</div>
		<div text-align: center; font-family: '楷体';>河南工业大学</div>
		<!--
			CSS定义位置:标签内部 style属性标签;style标签内部;CSS文件内部
			CSS语法:
				声明:color: red; 样式属性: 样式属性值;
			样式属性值:
				样式属性值有空格,需要使用引号或单引号
				样式属性值有多个,用逗号间隔
				样式属性值不区分大小写
		-->
		<!--
        	选择器:浏览器通过选择器为满足条件的HTML元素添加CSS样式
        	id选择器
        	class选择器
        	标签选择器
        -->
        
        <span class="wl">郑州轻工业大学</span>
        <b class="wl">河南工业大学</b>
        <i id="lw">郑州大学</i>
        <style>
        	/*
        	 *id选择器:以id标签属性的属性值为选择器(id标签属性值需要唯一)
        	 */
        	#hgd{
        		text-align: center; 
        		font-family: '楷体';
        	}
        	
        	/*
        	 *class选择器:以class标签属性的属性值为选择器
        	 */
        	/*.wl{
        		color: crimson;
        		font-family: "楷体";
        	}*/
        	
        	/*
        	 *标签选择器:以标签为选择器
        	 */
        	b{
        		font-size: 70px;
        	}
        	
        	/*
        	 *后代选择器:
        	 */
        	html body #hgd{
        		background-color: #8A2BE2;
        	}
        	
        	/*
        	 *分组选择器
        	 */
        	#lw,.wl{
        		color: crimson;
        		font-family: "楷体";
        	}
        	
        	/*
        	 *通配符选择器
        	 */
        	*{
        		margin: 0px;
        		padding: 0px;
        	}
        </style>
        
        
        <span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
        <style>
        	span{
        		height: 31px;
        		width: 302px;
        		display: inline-block;
        		border: 1px solid #e85356;
        		text-align: center;
        		line-height: 31px;
        		background-color: #e4393c;
        		color: #fff;
        		font-size: 20px;
        		font-family: "microsoft yahei";
        		cursor: pointer;
				
				span:hover{
        			background-color: cadetblue;
        		}
        	}
			<br /><br /><br />
        
        <a href="http://17kanju.com/" target="_blank">17看剧</a>
        <!--<style>
        	a{
        		font-size: 14px;
        		font-family: "PingFang SC","Microsoft YaHei",arial,"Hiragino Sans GB","Hiragino Sans GB W3";
        		text-decoration: none;
        		color: #333;
        	}
        	a:hover{
        		text-decoration: underline;
        		color: blue;
        	}
        </style>-->
        
        <br /><br /><br />
        
        <a href="http://www.beqege.cc/">笔趣阁</a>
        <style>
        	a{
        		font-size: 14px;
        		font-family: "PingFang SC","Microsoft YaHei",arial,"Hiragino Sans GB","Hiragino Sans GB W3";
        		text-decoration: none;
        	}
        	a:link{
        		color: #333333;
        	}
        	a:visited{
        		color: aquamarine;
        	}
        	a:hover{
        		text-decoration: underline;
        		color: blue;
        	}
        	a:active{
        		background-color: yellow;
        	}
        </style>
        </style>
	</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值