码迷,mamicode.com
首页 > 其他好文 > 详细

初用方块

时间:2018-09-23 16:25:33      阅读:150      评论:0      收藏:0      [点我收藏+]

标签:line   color   ati   spl   inline   utf-8   round   class   relative   

html部分

<!DOCTYPE html>
<html>
<head>
 <meta charset="utf-8">
 <title>Frame</title>
 <link rel="stylesheet" href="Frame.css">
</head>
<body>
    <div  class = "Frame" id="one">one</div>
    <div  class = "Frame" id="two">two</div>
    <div  class = "Frame" id="three">three</div>
    <div  class = "Frame" id="four">four</div>
</body>
</html>

 

css部分

.Frame{
 display:inline-block;/*inline表示横向排列,不能设置宽高,block表示纵向排列*/
 width: 100px;
 height: 100px;
 background: red;
 color: white;
}
#two{
 position:relative;
 top: 20px;
 left: 20px;
 background: blue;
}

初用方块

标签:line   color   ati   spl   inline   utf-8   round   class   relative   

原文地址:https://www.cnblogs.com/BOGY/p/9692680.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!