学习周记二
一、html
1.列表
无序列表:
< ul >
< li > *** < /li >
< /ul >
有序列表:
< ol >
< li > *** < /li >
< /ol >
自定义列表:
< dl >
< dt > *** < /dt >
< dd > -****** < /dd >
< /dl >
2.区块
< div id="****" style="width:…px;height:…px>
< /div >
二、css
1.id和class选择器
id:
#para1
{
text align:center;
color:blue;
}
class选择器:
.center
{
text align:center
}
二、css创建
1.外部样式表
< head >
< link rel=“stylesheet” type=“text/css” href=“mystyle.css”>
< /head >
2.内部样式表
< head >
< style >
hr {color:sienna;}
p {margin-left:20px;}
body {background-image:url(“images/back40.gif”);}
< /style >
< /head >
3.内联样式
< p style=“color:sienna;margin-left:20px”>这是一个段落。< /p >
二、实例演示
1.代码块
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<link rel="stylesheet" type="text/css" href="..\css/style.css">
<body>
<div id="container" style="background-color:lightyellow;width:500px">
<div id="website" style="background-color:lightgreen;height:50px">
<h1 style="margin-bottom:0;">www.runoob.com</h1></div>
<div class="menu" style="background-color:aliceblue;width:150px;height:200px;float:left">
<p class="center"><font size=5><b>目录</b></font></p>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JAVASCRIPT</li>
<li>JQUERY</li>
<li>VUE</li>
<li>BOOKSTRAP</li>
</ul></div>
<div id="content" style="background-color:bisque;width:350px;height:200px;float:left;line-height:150px;text-align:center">
<p><font size=7>主要内容</font></p>
</div>
</body>
</html>
二、实例效果