小编Dro*_*gon的帖子

.html()中的多个元素

我必须对象:对象S和对象SD.

//form group startTime
formStart = $(fstart).clone();
s = $(d).clone();
    $(s).addClass('input-group date datetimepicker-s').html(startTime);

sd = $(d).clone();
    $(sd).addClass('input-group date datetimepicker-s').html(startDate);
Run Code Online (Sandbox Code Playgroud)

我希望以这种方式将它们放在同一组中:

$(formStart).html(s,sd).prepend('<label>Begintijd</label>');
Run Code Online (Sandbox Code Playgroud)

但也许很明显,这是行不通的.我的问题是,是否可以在.html()中添加多个元素,或者是否可以这样做:

$(element).html().html();
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery

4
推荐指数
1
解决办法
145
查看次数

html css中的关键帧动画无法正常工作

我正在玩一些动画,但它根本不起作用.它必须是一个反弹动画.这是我第一次使用它.所以我希望我不犯错误

这是我的.html文件:

<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css"/>
</head>
<body>

<div class="logo"><img src="Header_red.png"/></div>
<div class="intro"><p>some text</p></div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

这是我的.css文件:

    html{
    background: url(background.jpg) no-repeat center center fixed;
    overflow:hidden;    
}

.logo
{
    text-align:center;
    margin-left:auto;
    margin-right:auto;
    animation-delay:1.2s;
    animation-duration:4.8s;
    animation-iteration-count:1;
    animation-fill-mode:both;
    animation-name:logo;    
}


.intro{
        text-align:left;
    margin-left:100px;
    margin-right:auto;
    animation-duration:5.5s;
    animation-iteration-count:1;
    animation-fill-mode:both;
    animation-name:logo;        
}
@keyframes logo {
    0%{transform: 
        translate(000px, 1500px);}
    20%
    {
        transform:translate(000px, 235px);
    }
    25%
    {
        transform:translate(000px, 265px);
    }
    65%
    {
        transform:translate(000px, 265px);
    }
    100%
    {
        transform:translate(000px, -300px);
    }
}


@keyframes intro{

0% {transform:
translate(000px, …
Run Code Online (Sandbox Code Playgroud)

html css animation css-animations

2
推荐指数
1
解决办法
9020
查看次数

标签 统计

css ×2

html ×2

animation ×1

css-animations ×1

javascript ×1

jquery ×1