15-18.htm

来自「有关JAVASCRIPT的源代码教程」· HTM 代码 · 共 42 行

HTM
42
字号
    <html> <head> <title>绝对定位演示 </title>
    <style type="text/css">
    <!--
       #first{
             background-color: red;
             border-style: solid;
             font-weight:bold;
             top: 20;
             position: absolute;
             left: 20;
             height: 200;
             width: 200;
       }
       #second{
              background-color: blue;
              border-style: dotted ;
              font-weight:bold;
              top: 60 ;
              position: absolute;
              left: 80;
              height: 200;
              width: 200;
       }
       #third{
             background-color: yellow;
             border-style: double ;
             font-weight:bold;
             top: 100 ;
             position: absolute;
             left: 140;
             height: 200;
             width: 200;
       }
    </style>
    <body>
        <p id="first"> 第1段落位置 </p>
        <p id="second">第2段落位置 </p>
        <p id="third"> 第3段落位置 </p>
    </body>
    </html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?