gpt4 book ai didi

jquery - CSS3 可折叠面板

转载 作者:行者123 更新时间:2023-11-28 14:40:17 24 4
gpt4 key购买 nike

我一直在试验新的 webkit CSS3 动画技术。我制作了一个应该可以工作的可折叠面板,但奇怪的是它在跳跃和静止。

CSS

.reveiws .content {
font-size:12px;
line-height:18px;
height:72px;
overflow:hidden;
float:left;
vertical-align:top;
max-width:560px;
-webkit-transition: height 800ms;
-moz-transition: height 800ms;
}
.reveiws .contentfull {
height:100%;
-webkit-transition: height 800ms;
-moz-transition: height 800ms;
}

HTML

<div id="pan<?php the_ID();?>" class="content"><?php the_content();?></div>

<div class="author" style="text-align:left; padding-right:10px;">

<a href="#" onclick="$('#pan<?php the_ID();?>').addClass('contentfull'); $(this).hide(); $(this).next().show(); return false">Read More &raquo;</a>
<a href="#" onclick="$('#pan<?php the_ID();?>').removeClass('contentfull'); $('#pan<?php the_ID();?>').addClass('content'); $(this).hide(); $(this).prev().show(); return false" style="display:none;">&laquo; Close panel</a>

这是一个 FIDDLE http://jsfiddle.net/L6Jwa/1/

最佳答案

我认为你的问题是你在一个类中的高度为 72px 而在另一个类中为 100%。更改为例如二等舱 400 像素,效果很好。

我不确定在这种情况下您是否可以使用 % 单位。

K

关于jquery - CSS3 可折叠面板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6081777/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com