摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>css的学习</title> <link rel="stylesheet" type="text/css&
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>css的学习</title>
<link rel="stylesheet" type="text/css" href="index1.css">
<style type="text/css">
*{margin: 0px;padding: 0px;}
p{list-style: none; width: 100px; height: 40px;line-height: 40px;text-align: center;background-color: #ccc;margin: 1px 1px;float: left;}
.box{width: 200px;height: 200px;background-color: pink;line-height: 200px;text-align: center;float: left;margin: 0px 1px;}
.clear{clear: both;}
a [href='#']{color: #ccc}
</style>
</head>
<body>
<p style="font-weight: bold">html</p>
<p style="color:red">css</p>
<p>JavaScript</p>
<p>jqueary</p>
<p>php</p>
<div class="clear"></div>
<div class="box">div1</div>
<div class="box">div2</div>
<div class="box">div3</div>
<a href="#">点击此处</a>
</body>
</html>
/*index1.css*/
img{width: 200px;height: 300px;}
p{color: blue;} CSS一般由两个部分构成,其中之一的方法是可以<head></head>标签中建立<style type="text/css"></style>标签,通过多个属性使页面变得更加美观,功能更加完善,可以在其中对其边框样式、背景控制、定位等多方面对页面的显示,功能十分丰富,在以后的前端设计中不可缺少.
批改老师:灭绝师太批改时间:2018-11-09 17:34:51
老师总结:总结有误啊,css样式声明{}由属性及属性值两部分组成;css样式:内联 内部 外部;还需要多多实践