简体   繁体   English

CSS3背景弹出过渡

[英]CSS3 Background Popup Transition

I'm working on a new site, and my client has a transition on the menu items that he'd like to try and keep. 我正在一个新站点上工作,我的客户在他想尝试保留的菜单项上进行了过渡。 The problem is that the menu is built in Flash ( it can be seen here ). 问题在于菜单是内置于Flash中的( 可以在此处看到 )。 How do I replicate that sort of movement using pure CSS? 如何使用纯CSS复制这种动作? While I could probably just do this with Javascript, I'd like to do it with pure CSS if that's at all possible. 尽管我可以使用Javascript做到这一点,但如果可能的话,我想使用纯CSS做到这一点。

Note that the text movement isn't necessary, but it would be nice if it were possible to do that too. 请注意,文本移动不是必需的,但是如果也可以这样做的话,那就太好了。 Here's the HTML for the list as I have it currently. 这是我当前拥有的列表的HTML。

<div class="menu-main-container">
<ul id="menu-main" class="top_nav inline unstyled">
  <li id="menu-item-61" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item active page_item page-item-59 current_page_item menu-item-61"><a href="http://ali.moberemk.com/">Home</a></li>
  <li id="menu-item-52" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-52"><a href="http://ali.moberemk.com/buyers/">Buyers</a></li>
  <li id="menu-item-51" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-51"><a href="http://ali.moberemk.com/sellers/">Sellers</a></li>
  <li id="menu-item-50" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-50"><a href="http://ali.moberemk.com/about-me/">About Me</a>
    <ul class="sub-menu">
      <li id="menu-item-57" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-57"><a href="http://ali.moberemk.com/testimonials/">Testimonials</a></li>
    </ul>
  </li>
  <li id="menu-item-53" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-53"><a href="http://ali.moberemk.com/listings/">Listings</a></li>
  <li id="menu-item-72" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-72"><a href="http://ali.moberemk.com/contact-me/">Contact Me</a></li>
</ul>
</div>

Take a look at this demo: http://webinfocentral.com , a little image in bottom-right corner. 看一下这个演示: http : //webinfocentral.com ,右下角有一个小图像。 It implements CSS3 animation. 它实现了CSS3动画。 If this is what you are looking for, I will include the code snippet below (pure CSS3 solution). 如果这是您要寻找的内容,我将在下面提供代码片段(纯CSS3解决方案)。

Also, these effects can be achieved by using jQuery: .slideUp() ( http://api.jquery.com/slideUp/ ) and .slideDown() ( http://api.jquery.com/slideDown/ ) 另外,可以使用jQuery实现以下效果: .slideUp()http://api.jquery.com/slideUp/ )和.slideDown()http://api.jquery.com/slideDown/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM