Blogger Information
Blog 16
fans 0
comment 1
visits 19038
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
html/css基础知识第一课:id、class等常用选择器用法 --20180810
学先森的博客
Original
768 people have browsed it

第一天作业


实例

<!doctype html> <!-- 声明 html文档-->
  <!-- 文件名: lesson01.html -->
<html>
<head>  <!-- 定义网页头部 -->
	<title>php中文网--视频教程</title>
	<meta charset="utf-8">
	<link rel="stylesheet" type="text/css" href="static/style.css">
	<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
	<style type="text/css">
		/*内部样式只针对当前页*/
		/*标记选择器*/
		body{background:orange;}
		/*id选择器*/
		#box{width:200px; height:200px; background:pink;}
		/*class选择器*/
		.main{width:300px; height:300px;background:#ccc;}
		/*属性选择器*/
		a[href="http://www.baidu.com"]{color:#DDD;}
		/*派生选择器*/
		div a{color:white;}
		#box a{color:#000;}
	

	</style>
</head>
<body>
	<img src="">
	<a href="http://www.baidu.com">百度</a>
	<a href="http://www.php.cn">php中文网</a>
	<a href="demo.html">demo</a>
	<a href="#">#</a>
	<div id="box">
		<a href="">php</a>
	</div>
	<div class="main"></div>
	<div style="width:100px; height:100px; background:#222">
		<a href="">xs</a>
	</div>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

手写代码

1.jpg

2.jpg

完成

手写代码补上了

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
1 comments
灭绝师太 2018-08-13 15:12:54
作业名最好以自己当天学习的知识点命名,代码整洁规范 ps手写代码呢?
1 floor
Author's latest blog post