dreamweaver随记---ap div和div的区别

来源:互联网 发布:windows 98 编辑:程序博客网 时间:2024/05/18 03:39

ap div 是绝对定位层,div是层;

其实ap div 就是比在创建div时 多自动生成 了样式控制

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#apDiv1 {
 position:absolute;
 left:15px;
 top:62px;
 width:473px;
 height:247px;
 z-index:1;
 color: #000;
 background-color: #FFCC33;
 text-align: center;
}
</style>
</head>

<body>
<div id="apDiv1">
  <p>课程介绍</p>
  <p><img src="images/2.jpg" width="149" height="142" /></p>
</div>
<div>此处显示新 Div 标签的内容</div>
</body>
</html>