自动隐藏css

时间:2017-09-30 11:13:05

标签: css3

我想在 10s 之后显示div

它获得了成功,但它也自动隐藏

我不想隐藏它!

我试过了:http://jsfiddle.net/omarqa/fs69z2e7/

3 个答案:

答案 0 :(得分:1)

从班级let urlString = "https://api.coinmarketcap.com/v1/ticker/bitcoin/?convert=AUD" let url = URL(string: urlString) URLSession.shared.dataTask(with:url!) { (data, response, error) in if error != nil { print(error as Any) } else { do { let parsedData = try JSONSerialization.jsonObject(with: data!) as! [String:Any] let id = parsedData["id"] as! [String:Any] print(id) } catch let error as NSError { print(error) } } }.resume()

中删除opacity: 0;

新代码:

element-to-animate

答案 1 :(得分:0)

你有一个动画,每个动画都有一个间隔。 如果你想要循环你必须设置的动画

 animation-iteration-count: 1;

https://www.w3schools.com/cssref/css3_pr_animation-iteration-count.asp

答案 2 :(得分:0)

在所有关键帧中将0%的不透明度值从0更换为1。

在您的班级animation-fill-mode: forwards

中添加.element-to-animate媒体资源
    .element-to-animate {
    -webkit-animation: NAME-YOUR-ANIMATION 10s forwards;
    -moz-animation: NAME-YOUR-ANIMATION 10s forwards;
    -o-animation: NAME-YOUR-ANIMATION 10s forwards;
    animation: NAME-YOUR-ANIMATION 10s forwards;
    opacity:0;
}