<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<style>
*{margin: 0;padding:0;}
.site-demo-flow {
width: 600px;
height: 300px;
overflow: auto;
text-align: center;
}
.site-demo-flow img {
display: inline-block;
width: 40%;
height: 200px;
border: none;
}
</style>
<body>
<div class="site-demo-flow">
<img src="http://placeholder.qiniudn.com/400x400/4CD964/fff">
<img src="http://placeholder.qiniudn.com/400x400/4CD964/fff">
<img src="http://placeholder.qiniudn.com/400x400/4CD964/fff">
</div>
</body>
</html>
父元素text-align: center对inline-block子元素的影响
最新推荐文章于 2022-04-01 20:57:42 发布