Blogger Information
Blog 3
fans 0
comment 0
visits 2153
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
html/css基础知识总结(基本标签和类选择器使用方法)2018年8月10日作业
王松松的博客
Original
553 people have browsed it

以下为本节课的手敲代码

实例

<!DOCTYPE html>      <!-- xml xhtml 声明 --> <!-- ctrl+/ -->
<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/footlogo.png">
	<style type="text/css"> /*内部样式只针对当前页面*/
	 /*tag 标签名,id名 class */
	  body{} /*标记选择器*/
	  #box{width: 100px;height: 100px; background: pink;}/*d选择器*/
	  .main{width: 100px;height: 100px; background: green;} /*class 选择器 类 属性选择器*/
	   a{color:red;}
	   a[href="http://www.php.cn/"]{color: blue;}
	   a[href="demo2.html"]{color:pink;}
       div a{color: #000;}
       #box a{}       
	</style>
</head>
<body ><!-- 内联样式 -->
<img src="">
<a href="https://baidu.com">百度</a>
<a href="http://www.php.cn/">php中文网</a>
<a href="demo2.html">demo2</a>
<a href="">#</a>
<div id="box">
	<a href="">php</a>
</div>
<div class="main"></div>
<div></div>
<div></div>
</body>
</html>

运行实例 »

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


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
0 comments
Author's latest blog post