zoukankan      html  css  js  c++  java
  • CSS中的绝对定位

    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="utf-8">
    		<title>绝对定位</title>
    		<style type="text/css">
    			#mydiv {
    				background-color: cadetblue;
    				border: medium red solid;
    				 100px;
    				height: 100px;
    				/*绝对定位*/
    				position: absolute;
    				/*离左边100px;离顶部100px*/
    				left : 100px;
    				top : 100px;
    			}
    			#yourdiv {
    				background-color : bisque;
    				border: medium blue solid;
    				 100px;
    				height: 100px;
    				position: absolute;
    				left : 50px;
    				top : 50px;
    			}
    		</style>
        </head>
    	<body>
    		<div id="mydiv"></div>
    		<div id="yourdiv"></div>
    	</body>
    </html>
    

    在这里插入图片描述

  • 相关阅读:
    LeetCode 169
    LeetCode 152
    LeetCode 238
    LeetCode 42
    LeetCode 11
    GDB基本调试
    小咪买东西(最大化平均值)
    codeforces 903D
    hdu 5883
    hdu 5874
  • 原文地址:https://www.cnblogs.com/yu011/p/13520657.html
Copyright © 2011-2022 走看看