:::

3-6 index2.html(position:fixed)

<!DOCTYPE html>
<html lang="zh-TW">
  <head>
    <meta charset="utf-8">
    <title>position 練習</title>
    <style type="text/css">
    #a {
      width:100px;
      height:100px;
      border:1px solid #000;
      background: yellow;
      text-align:center;
      line-height: 100px;
    }

    #b {
      width:100px;
      height:100px;
      color:white;
      border:1px solid #000;
      background: blue;
      text-align:center;
      line-height: 100px;
      position: fixed;
      top:20px;
      right:10px;
    }

    #c {
      width:100px;
      height:100px;
      color:white;
      border:1px solid #000;
      background: green;
      text-align:center;
      line-height: 100px;
    }
    </style>

  </head>

  <body style="height:2000px;">
    <div id="a">
      aaaaa
    </div>

    <div id="b">
      bbbbb
    </div>

    <div id="c">
      cccccc
    </div>
  </body>
</html>

 


:::

搜尋

QR Code 區塊

https%3A%2F%2Fwww.tad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbsn%3D32%26tbdsn%3D914

書籍目錄

展開 | 闔起

線上使用者

66人線上 (12人在瀏覽線上書籍)

會員: 0

訪客: 66

更多…