CSS转换使图像在悬停时上下移动

Jos*_*nby 4 html5 css3 css-transitions

http://imgur.com/bXU8I

我有这个图像,知道我需要使用css过渡来滚动时乙烯基向下移动?你会怎么做呢?

Vin*_*rgh 5

应用于position:relative"乙烯基"元素,然后在其悬停状态下设置top:#px.

例如:

#vinyl {
 position: relative;
 /* transition properties here */
}

#vinyl:hover {
 top: 5px;
}
Run Code Online (Sandbox Code Playgroud)