24°

子绝父相-哈根达斯例子

<html lang="en">
<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">
    <title>Document</title>
    <style>
    *{
        margin: 0;padding: 0;
    }
    .adv {
      width: 310px;
      height: 190px;
      border: 1px solid #cccccc;
      margin: 100px auto;
      padding: 10px;
      position: relative;
    }
    .top {
        position: absolute;    
        /* 子绝父相 */
        top:0;
        left:0;
    }
    .buttom-right {
        position: absolute;
        bottom :0;
        right: 0;
    }
    .buttom-left {
        position: absolute;
        bottom :0;
        left: 0;
    }
    </style>
</head>
<body>
    <div class="adv">
            <img src="images/top_tu.gif"  class="top" alt="">
            <img src="images/br.gif"  class="buttom-right" alt="">
            <img src="images/bl.gif"  class="buttom-left" alt="">
            <img src="images/adv.jpg" alt=""> 
<span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span>

</body> </html>

运行图如下:

本文转载自博客园,原文链接:https://www.cnblogs.com/fhtax/p/12215450.html

全部评论: 0

    我有话说: