当前位置: 移动技术网 > IT编程>网页制作>CSS > 前端四角定位代码实例

前端四角定位代码实例

2018年04月05日  | 移动技术网IT编程  | 我要评论

前端四角定位代码实例

<!DOCTYPE html>  
<html lang="en">  
<head>  
    <meta charset="UTF-8">  
    <title>四角定位</title>  
    <style>  
  
        p{  
            width: 100px;  
            height: 100px;  
            background: red;  
            position: absolute;  
        }  
        #box1{  
            top: 0;  
            left: 0;  
        }  
        #box2{  
            top: 0;  
            right: 0;  
        }  
        #box3{  
            bottom: 0;  
            left: 0;  
        }  
        #box4{  
            bottom: 0;  
            right: 0;  
        }  
    </style>  
</head>  
<body>  
      
    <p id="box1"></p>  
    <p id="box2"></p>  
    <p id="box3"></p>  
    <p id="box4"></p>  
</body>  
</html>  

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网