CSS3过渡为“顶部"和“左"属性不起作用 [英] CSS3 transition for "top" and "left" properties not working
问题描述
我有一个列表,当我将鼠标悬停在列表上时,列表上的一项过渡到东北.使用margin-top
和margin-left
属性转换可以工作,但是将鼠标悬停在该项目上会继续推动其他元素,因此我添加了position:relative
并尝试使用top
和left
过渡属性,但是它似乎没有用. /p>
这是jsfiddle:
您是否尝试过设置列表的父级.我知道有时亲戚会有问题,除非基础项目也是亲戚或绝对的.只是一个想法.
I have a list with one item on the list transitioning to the northeast when I hover over it. Using margin-top
and margin-left
property transitions worked but the item being hovered over kept pushing other elements so I added position:relative
and tried using top
and left
transition properties but it didn't seem to be working.
Here is the jsfiddle:
Have you tried setting the parent of your list. I know sometimes relative has issue unless the underlying item is also relative or absolute. Just a thought.
这篇关于CSS3过渡为“顶部"和“左"属性不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!