一个基本的 CSS/HTML 问题。如我的屏幕截图所示,左侧有一个箭头图像,我想移动它,使箭头的中点略高于后面文本的中点。可能这是基本的东西,但 css 中的哪些属性可以帮助我做到这一点?
我有一个像这样的图像的 css 类。
<img src="images/block_arrow.png" class="t-image imagestyle1" alt="image"/>
谢谢,阿达什
最佳答案
添加以下CSS..
.t-image {
position: relative /* Declared position allows for location changes */
top: -2px; /* Moves the image 2px closer to the top of the page */
}
关于html - 如何对齐我的图像以垂直向上移动它?(CSS,HTML)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8090195/