(066)css_position_relative&absolute
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title>layout_relative_absolute.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!--<link rel="stylesheet" type="text/css" href="./styles.css">--> <style type="text/css"> #box1{ width:200px; height:200px; border:1px solid blue; position:relative; } #box2{ position:absolute; top:20px; left:30px; border:1px solid green; } #box3{ width: 200px; height: 200px; border:1px solid pink; position: relative; } #box4{ position: absolute; bottom: 3px; } </style> </head> <body> <div id="box1"> <div id="box2">相对参照元素进行定位</div> </div> <h1>下面是任务部分</h1> <div id="box3"> <img src="http://img.mukewang.com/541a7d8a00018cf102000200.jpg"> <div id="box4">当我还是三年级的学生时是一个害羞的小女生。</div> </div> </body> </html>
***万事万物都有裂痕,那是光照进来的地方***

浙公网安备 33010602011771号