相对定位

2017-06-13 11:23:00
admin
原创
501
<!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=gbk" /> 
  <title>DIV+CSS practice
   </title> 
  <style type="text/css"> 
   #first {
     width: 200px;
     height: 100px;
     border: 1px solid red;
	 position: relative; 
	 top: 20px; 
	 left: 20px;
    }
    #second{
     width: 200px;
     height: 100px;
     border: 1px solid blue;
    }
   </style> 
  <body> 
   <div id="first"> first
    </div> 
   <div id="second">second
    </div> 
  </body>
 </html>
  • QQ讨论群
  • 关注微信
    • 欢迎咨询
    • 欢迎加入QQ群 16506021
  • 公众号:源宝网络