background-color: #33CCFF
height: 200px
border:#000 2px solid
width: 210px
}
<!DOCTYPE html><html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
margin: 0px
padding: 0px
}
span{
display: block/*block把span元素定义成块元素*/
width: 100px
/*height: 100px*/
/*text-align: center*/
font-size: 20px
padding: 30px 30px 30px 30px
border: 1px solid #333
}
.left{
background-color: red
}
.right{
background-color: #3498db
}
p{
width: 100px
/*height: 100px*/
background-color: #99db76
padding: 40px
font-size: 20px
}
</style>
</head>
<body>
<span class="left">行内元素1</span>
<span class="right">行内元素2</span>
<p>p标签元素</p>
</body>
</html>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)