zoukankan      html  css  js  c++  java
  • CSS Position

    练习了不同的定位方式

    The Position Test

    1234
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
    
        <link rel = "stylesheet" href="CSS.css">
        <title>The Position Test</title>
    </head>
    <body>
        <dir id="one">1</dir>
        <dir id="two">2</dir>
        <dir id="three">3</dir>
        <dir id="four">4</dir>
    </body>
    </html>
    

      这是CSS.css文件

    * {
        border: 2px solid #357;
        padding: 120px;
         100px;
        height: 100px;
    }
    
    #one {
        background-color: blueviolet;
        position: relative;
    }
    
    #two {
        background-color: peru;
        position: absolute;
    }
    
    #three {
        background-color: lawngreen;
        position: relative;
    }
    
    #four {
        background-color: darkred;
        position: static;
    }
    

      

  • 相关阅读:
    电脑快捷键
    方法
    运算符和表达式
    Java关键字和标识符
    字体和文本
    盒子模型
    css
    常用标签
    第一次课(上)
    出现次数最多的数字
  • 原文地址:https://www.cnblogs.com/ghostang/p/9698978.html
Copyright © 2011-2022 走看看