zoukankan      html  css  js  c++  java
  • html中position两属性relative和absolute区别

    源码如下:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>image position </title>
    <style type="text/css">
    html,body{100%;height:100%;margin:0px;padding:0px;}
    div{border:solid gray 1px;}
    #one1,#one2{height:300px;500px;}
    #one1{position:relative; margin-left:10px; margin-top:10px; padding:10px 0px 0px 10px;}
    #one11{position:absolute;top:10px;left:10px;}
    </style>
    </head>
    <body onclick="javascript:alert(0);">
    <div id="one">
    <div id="one2">

    </div>
    <div id="one1">
    <img alt="MM" src="1.jpg" height="300" width="500"/>
    <div id="one11"><img alt="" src="2.jpg" width="100" height="100" /></div>
    </div>

    </div>
    </body>
    </html>

    在firefox 和 IE中测试过,有问题请给我留言。
  • 相关阅读:
    java泛型
    跨域传递
    laravel的一些语法
    去重
    laravel的一些查询语句
    mysql把之前表单进行拆分
    Laravel5.1接收json数据
    thinkphp5 composer安装验证码
    关于地图经纬度的问题
    tp5分组查询
  • 原文地址:https://www.cnblogs.com/xinzhuangzi/p/4100573.html
Copyright © 2011-2022 走看看