cyzzs

导航

新手学习web第九弹

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			@font-face {
				font-family:BOOMBOX;
				src: url("第八周/font/BOOMBOX.TTF")
			}
			/*内部样式*/
			h1{
				color: red;
			}
			/*.b{
				color: #0000FF;
			}
			.c{
				color: wheat;
			}*/
			a:nth-child(2n){
				color:salmon ;
			}
			/*id选择器*/
			#b{
				color: darkkhaki;
			}
			/*标签指定选择器*/
			p.red{
				color: darkmagenta;
			}
			/*后代选择器*/
			div a{
				font-size: 60px;
			}
			/*并集选择器*/
			p,h1{
				font-size: 90px;
				font-family: BOOMBOX;
			}
		</style>
	</head>
	<body>
		<!--添加行内样式-->
		<!--内联样式只有一个属性就是style-->
		
		<h1 style="color: red;">hello</h1>
		<a href="" class="b">超级链接1</a>
		<a href="" class="c">超级链接2</a>
		<a href="" class="b" id="b">超级链接3</a>
		<a href="" class="c">超级链接4</a>
		<div><a href="" class="b">超级链接5</a></div>
		<a href="" class="c">超级链接6</a>
		<p class="red">hello</p>
	</body>
</html>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			*{margin: 0; padding: 0;}
			@font-face {
				/*font-family: rock;
				src: url("第八周/font/6.TTF");*/
				font-family: ONYX;
				src: url("font/ONYX.TTF");
			}
			@font-face {
				font-family: rock;
				src: url("font/6.TTF");
			}
			@font-face {
				font-family:cfdx;
				src: url("font/1.TTF");
			}
			.a{
				font-family: ONYX;
				/*text-align: center;*/
			}
			.b{
				font-family: "微软雅黑";
				/*text-align: center;*/
				color: #4c9372;
			}
			.c{
				font-family: rock;
				font-style: oblique;
			}
			.d{
				font-family: cfdx;
			}
			.e{
				color: #e1005a;
			}
			.r{
				/*强制文本不换行*/
				white-space: nowrap;
				/*超出部分隐藏**/
				/*父级高度塌陷也用*/
				overflow: hidden;
				/*超出部分显示省略号*/
				text-overflow: ellipsis;
			}
		</style>
	</head>
	<body>
		<p class="a">NO.3<span class="b">BUTTERFLY</span></p>
		<p class="c">in August<span>28th.2015</span></p>
		<p class="d"><b>2015</b><span class="e">秋装全面上新</span></p>
		<p>全场两件<span class="e">包邮</span></p>
		<p class="r">所有邂逅相逢,所有萍水相逢,都在缘分的天空下慢慢演绎。一款柔情含蓄的文字出现之前,语言只能是有声语言,伴随其他非语言的辅助手段;文字出现之后,将诉诸听觉的有声语言转化为诉诸视觉的书面形式,从而形成了书面语言。口语和书面语并存,使人类表达思想的渠道更为多样,语言可以更好地为人类社会服务。有人说,语言使人类脱离了动物,文字使人类迈入了文明(有“文”才“明”)。</p>
	</body>
</html>

posted on 2026-04-27 18:21  沉鱼舟作晚  阅读(19)  评论(1)    收藏  举报