Blogger Information
Blog 8
fans 0
comment 0
visits 3563
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
盒模型,定位与浮动-2018年8月16日
玩美者传媒的博客
Original
577 people have browsed it

实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的相对定位</title>
</head>
<style>
    .box1{
        width: 50px;
        height: 200px;
        background-color: #FC0107;
        position: relative;
        left: 200px;

    }
    .box2{
        width: 200px;
        height: 50px;
        background-color: #555555;
        position: relative;
    }
    .box3{
        width: 200px;
        height: 50px;
        background-color: #FFE80E;
        position: relative;
        left: 250px;
        top: -50px;
    }
    .box4{
        width: 50px;
        height: 200px;
        background-color: #39FF1B;
        position: relative;
        left: 200px;
        top: -50px;
    }
</style>
<body>
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
<div class="box4"></div>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

运行图

屏幕快照 2018-08-19 上午1.06.43.png

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post