我是一个初学者。我有两个图像,我很累于将它们居中并在它们之间添加文本,但是似乎没有任何作用。我尝试使用“行内块”和“位置:绝对”。This image might help you to understand what i am trying to do
一种方法是使用flexbox:
.container {
display:flex;
align-items:center;
}
.container span {
padding: 10px;
}
<div class="container">
<img src="https://via.placeholder.com/150"/>
<span>Some text</span>
<img src="https://via.placeholder.com/150"/>
</div>