gpt4 book ai didi

html - 在 span 内居中 img

转载 作者:行者123 更新时间:2023-11-28 16:38:34 25 4
gpt4 key购买 nike

我正在尝试将图像置于跨度内。但它不起作用。

这是我的代码的链接:jsfiddle

<div>
<label>
<span>left span that can have more than one line</span>
<span><img class="redcross" /></span>
</label>
</div>

类“redcross”是我想要垂直居中的类

谁能帮帮我?

最佳答案

更改您的css:

.button {
position:absolute;
width:24px;
height:100%;
top:3px;
right:0;
}

顶部 0 到 3px;

关于html - 在 span 内居中 img,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34083553/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com