1

我制作了这个小视频(如果有背景噪音请忽略)

http://www.screenr.com/Qvts

它的 13 秒,但只需要在第 5 秒看到动画;(或访问keepyourlinks.com并等待几秒钟,直到您可以看到相同的框并单击)

css - 该项目有两个类 -

.keepeos .top {
    border-radius: 0.2em 0.2em 0.2em 0.2em;
    color: #000066;
    font-size: 40px;
    height: 120%;
    padding-bottom: 3px;
    padding-top: 3px;
    position: relative;
    right: 10%;
    top: -4px;
    width: 120%;
}

.caja_con_sombra {
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.9);
}

和 javascript(发布了完整的脚本,但在我看来,对唯一的相关行发表了评论。

    <script type="text/javascript">


    var variable;
        function check_more(id){

        var nID=$(".item_lista_links:first").attr("id"); //get the newest item's id
        var tid= nID.replace('link', '');
        $('#are_more').load('/includes/router.php?que=check_more&last='+tid+''); // check if newer
        }
          function buscar_nuevos(){
           var nID=$(".item_lista_links:first").attr("id");
           var id= nID.replace('link', '');
           variable = setInterval('check_more('+id+')',15000); //start checking
        }
        function ver_nuevos(id){  // when found news and retrieving 
           clearInterval(variable);  
            $('#are_more').html('');        //clear div


            /*THIS is basically the only relevant javascript line, i think */
            $('#load_more').slideUp(100).load('/includes/router.php?que=load_more&last='+id+'', 


function() {


    variable = setInterval("check_more(139125)",15000);
              $(this).slideDown(600); //start checking
                return false;
             });
        }
    </script>

那么如何防止这个阴影扩大整个垂直动画呢?

4

1 回答 1

1

我仍然不确定发生了什么,但我知道如何解决它(至少现在是这样)。这可能是由于元素滑动与 jquery 中的高度问题混合,对于滑动元素中的子元素,但我不确定。无论哪种方式:

知道了,这里有一个修复。在estilo.css中,找到

.keepeos {
    height: auto;
}

将其更改为:

.keepeos {
    height: 18px;
}

如果它变成多行,这将对您不利,因此如果您将来需要,也许您可​​以在滑动时切换标签,然后在完成后将其切换回来。

于 2011-11-30T19:45:05.190 回答