使用 css3 过渡定位多个 css 元素
我认为这会更容易向您展示而不是解释,但基本上我试图在用户将鼠标悬停在其中一个标签上时在两个单独的 div 标签上创建过渡效果。这是我刚刚举出的一个例子。它并不完美,我只是想弄清楚如何将机器人分成两半。
http://color-reel.com/growbot.html
目前,当你将鼠标悬停在它上面,但我希望左半部分和右半部分都必须打开,这样看起来机器人就要散架了。
预先感谢您的帮助!
编辑:ps 一些小事让我烦恼,我不知道它是否“可修复”,如果 div 元素在悬停在元素上时滑过用户的鼠标,它会出现故障。有一个简单的方法可以解决这个问题吗?
I think this will be easier to show you than explain, but basically I am trying to create a transition effect on two separate div tags when the user hovers over one of them. Here's an example I just whipped up. It's not perfect, I'm just trying to figure out how to split the robot in half.
http://color-reel.com/growbot.html
currently, the right half will move when you hover over it, but I want both left halves and the right have to open up so it looks like the robot is coming apart.
thanks in advance for your help!
edit: p.s. something small that annoys me that I don't know if it's "fixable" is if div element slides past the user's mouse when the element is being hovered over, it glitches. is there an easy way to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您嵌套 div,也许您可以定位父 div。
所以你会得到这样的东西:
Maybe if you nest the divs you might be able to target the parent div.
So you get something like this: