站内搜索:
首页 >> 前端 >> 内容
对联广告代码实现

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

对联广告代码实现

<!DOCTYPE html>  
<html lang="en">  
<head>  
    <meta charset="UTF-8">  
    <title>对联广告</title>  
    <style>  
        #main{  
            width: 1000px;  
            height: 600px;  
            margin: 0 auto;  
            background: #ccc;  
        }  
        #box1{  
            width: 45px;  
            height: 80px;  
            background: red;  
            position: absolute;  
            top:120px;  
            left:5px;  
        }  
        #box2{  
            width: 45px;  
            height: 80px;  
            background: red;  
            position: absolute;  
            top: 120px;  
            right: 5px;  
        }  
    </style>  
</head>  
<body>  
      
    <p id="main"></p>  
  
    <p id="box1">box1</p>  
    <p id="box2">box2</p>  
  
      
</body>  
</html>  

  • 上一篇:前端行内元素代码实例
  • 下一篇:子代选择器后代选择器代码实例
  • 返回顶部