国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

CSS ??

CSS??? Position ??? ?? ???? ?? ?? ?? ??? ?? ?? ??? ????. ?? ??? ??? ?? ????. ?? ??? ???? ?? ????? ? ????.

Position ??: ??? ?? ?? ??? ?????. ?, ??? ?? ??? ?????? ???? ???? ?? ??? ?????.

?? ?? ?:

??: ?? ?? ??? ?? ? ?? ??? ???? ?? ?? ?? ??? ?????. ?? ??? ?? ?? ?????. ??? ??? "left", "top", "right" ? "bottom" ??? ?? ?????.

relative: ????? ??? ??? ??? ???? ?? ??? ???? ?????. ??? "left:20"? ??? ?? ??? 20??? ?????.

??: ???? ?? ???? ?? ??? ?? ??? ?????.

??: ??????. ?? ??? ??? ??? ?? ??(??, ??, ??, ??? ?? Z-?? ?? ??)?? ?????. ??? ??? "left", "top", "right" ? "bottom" ??? ?? ?????.

inherit: ?? ??? ?? ?? ???? ????? ?????.

?? ????? ???? ? ?? ??? ??? ??? ?????.

?? ?? ??:

①??: ???? ??? ?? ?? ?????. left of the element ??? ????? ??? ?? ????.

②right: ?? ???? ??? ?? ?? ??? ???? ??? ?? ?? ?????.

③top: ?? ?? ??? ?? ?? ??? ??? ??? ?? ?? ?????.

IV??: ?? ??? ??? ?? ?? ??? ?? ??? ?? ?? ?????.

? ??? ?? ??(??: px)? ? ????.


?? ??

?? ?? ; ????? ?? ???? ??? ??? ??? ?? ??? ?????. ?? ??? ?? ??? ?? ??? ?? ?????(??? ???? ??). ??? ??? ?? ?? ?????.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>實(shí)例</title> 
  <style type="text/css">
        html body
        {
            margin: 0px;
            padding: 0px;
        }
        #parent
        {
            width: 200px;
            height: 200px;
            border: solid 5px black;
            padding: 0px;
            position: relative;
            background-color: green;
            top: 15px;
            left: 15px;
        }
        #sub1
        {
            width: 100px;
            height: 100px;
            background-color: blue;
            position: absolute;
            top: 15px;
            left: 15px;
        }
        #sub2
        {
            width: 100px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>
<body>
    <div id="parent">
        <div id="sub1">
        </div>
        <div id="sub2">
        </div>
    </div>
</body>
</html>

??: ??? Sub1? ?? ??? ???? ??? Sub1? ??? ????? ?? Div Sub2? Sub1? ??? ?????? Sub1? Sub2? ?????.

?? ?? ?? ??

?? ?? ??? ?? ??? ????? ???? ????. ?? ??? ?? ??? ??? ???? ?? ??? ?????. ?? ??? ?? ??? ?? ???? ? ??? ?? ?????.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>實(shí)例</title> 
  <style type="text/css">
        html body
        {
            margin: 0px;
            padding: 0px;
        }
        #parent
        {
            width: 200px;
            height: 200px;
            border: solid 5px black;
            padding: 0px;
            position: relative;
            background-color: green;
            top: 15px;
            left: 15px;
        }
        #sub1
        {
             width: 100px;
             height: 100px;
             background-color: blue;
             position: relative;
             top: 15px;
             left: 15px;
        }
        #sub2
        {
            width: 100px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>
<body>
    <div id="parent">
        <div id="sub1">
        </div>
        <div id="sub2">
        </div>
    </div>
</body>
</html>

??: Sub1? ????? Sub2? ??? ??? ?? ?? ??? Sub2? ???? ?? ? ? ????. ???? Div? ??? ??? ?? ?????. ????? Sub1? ?? ??? ???? ???.

?? ??

?? ??? ???? ????? ??? ??? ??? ? ??? ???? ????.

<meta charset="utf-8"> 
<title>實(shí)例</title> 
  <style type="text/css">
        html body
        {
            margin: 0px;
            padding: 0px;
        }
        #parent
        {
            width: 200px;
            height: 200px;
            border: solid 5px black;
            padding: 0px;
            position: relative;
            background-color: green;
            top: 15px;
            left: 15px;
        }
        #sub1
{
  width: 100px;
  height: 100px;
  background-color: blue;
  position: absolute;
  top: 15px;
  left: 15px;
}
#sub2
{
  width: 100px;
  height: 100px;
  background-color: red;    
  position: fixed;
  top: 5px;
  left: 5px;              
}
    </style>
</head>
<body>
    <div id="parent">
        <div id="sub1">
        </div>
        <div id="sub2">
        </div>
    </div>
</body>
</html>

??: Sub2? ?? ??? ?? ?????.


???? ??
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>實(shí)例</title> <style type="text/css"> div { height: 200px; width: 300px; border-color: Black; border-style: solid; border-width: 1px; } #a { position:absolute; left:900px; top:150px; } #b { position:relative; left:500px; top:100px; } #c { position:fixed; left:970px; top:400px; } #d { position:static; background-color:Window; } </style> </head> <body>   <div id="a" >     div-a<br />     position:absolute;<br />     絕對(duì)定位;脫離文檔流,遺留空間由后續(xù)元素填充。   </div>   <div id="b" >     div-b<br />     position:relative;<br />     相對(duì)定位;不脫離文檔流,只改變自身的位置,在文檔流原先的位置遺留空白區(qū)域。   </div>   <div id="c" >     div-c<br />     position:fixed;<br />     固定定位;固定在頁(yè)面中,不隨瀏覽器的大小改變而改變位置。   </div>   <div id="d"></div>   <br><br><br><br><br><br><br><br><br><br> </body> </html>