如何在图像中对齐以将其垂直移动?(CSS,HTML)?

问题描述:

一个基本的CSS / HTML问题。正如我的屏幕截图所示,左侧有一个箭头图像,我想以箭头的中点略高于文本中点的方式移动它。也许这是基本的东西,但在CSS的什么属性会帮助我做到这一点?

A basic CSS/HTML question. As shown in my screenshot, there is an image of an arrow in the left, I want to move it in such a way that the mid point of the arrow is slightly above the mid point of the text following that. Probably this is basic stuff, but what property in css will help me do that?

我有一个css类的图像是这样的。

I have a css class for the image something like this.

<img src="images/block_arrow.png" class="t-image imagestyle1" alt="image"/>

谢谢,Adarsh

添加以下css。

Add following css..

.t-image {
    position: relative /* Declared position allows for location changes */
    top: -2px; /* Moves the image 2px closer to the top of the page */
}