站内搜索:
首页 >> 前端 >> 内容
前端四角定位代码实例

时间:2018/3/30 14:41:46

前端四角定位代码实例

<!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>  

  • 上一篇:图片轮播代码实现教程
  • 下一篇:vue.js中filters的用法详解
  • 返回顶部