CSS display(展示)属性

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.c1{
width: 200px;
height: 200px;

/*none隐藏属性 block块标签 inline内敛标签 inline-block(同时拥有块和内敛标签属性,注意:同时设置)*/
display: inline-block;
}
.c2{
width: 200px;
height: 200px;

display: inline-block;
}
.c3{
width: 200px;
height: 200px;
background-color: rebeccapurple;
display: inline-block;
}
</style>
</head>
<body>
<div><sapn>商品名称</sapn> <sapn>规格与包装</sapn> <sapn>评论</sapn></div>
<div class="c1">商品名称</div>
<div class="c2">规格与包装</div>
<div class="c3">评论</div>


</body>
</html>

 

posted @ 2022-05-28 17:42  呼长喜  阅读(47)  评论(0编辑  收藏  举报