\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n(1000 = 1 second / 10000 = 10 seconds)\n\nBye. 😊","upvoteCount":13},"suggestedAnswer":[{"@type":"Answer","text":"Put this on CSS file:\n\nimg {\r\n animation-name: transperancychange; \r\n animation-duration: 5s;\r\n}\r\n\n@keyframes transperancychange {\r\n from { opacity: 1.0; }\r\n to { opacity: 0.0; }\r\n}","upvoteCount":10},{"@type":"Answer","text":"@Maz I think css animation still not fully compatible to all browsers yet.","upvoteCount":4},{"@type":"Answer","text":"js:\n\nsetInterval(function() {\n yourImageElement.style.visibility = \"hidden\":\n}, 4)","upvoteCount":2},{"@type":"Answer","text":"https://code.sololearn.com/W9ytRz9oYsyt/?ref=app","upvoteCount":2},{"@type":"Answer","text":"@Calvin Lee F*** IE","upvoteCount":2},{"@type":"Answer","text":"@Maz I just changed opacity to cross browser, hopefully this time can work on your phone. ☺","upvoteCount":2}]} }
+ 8

Dissapearing images

How can I make images disappear after a few seconds​ coding please

22nd Apr 2017, 2:40 PM
Iwan
Iwan - avatar
7 ответов
+ 13
Hi @Calvin, your code doesn't work in my phone. 😕 @Bebida, set the time to "5000", your function will actived after only 4 millisecond. An alternative way is Javascript, you can use a simple function like this: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <img src = "yourimage.extension" id = 'img1'> <script> var img = document.getElementById('img1'); setInterval(function () { img.style.display="none"; }, 5000) </script> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (1000 = 1 second / 10000 = 10 seconds) Bye. 😊
22nd Apr 2017, 3:21 PM
Maz
Maz - avatar
+ 10
Put this on CSS file: img { animation-name: transperancychange; animation-duration: 5s; } @keyframes transperancychange { from { opacity: 1.0; } to { opacity: 0.0; } }
22nd Apr 2017, 2:55 PM
Cyrus Ornob Corraya
Cyrus Ornob Corraya - avatar
+ 4
@Maz I think css animation still not fully compatible to all browsers yet.
22nd Apr 2017, 3:23 PM
Calviղ
Calviղ - avatar
+ 2
js: setInterval(function() { yourImageElement.style.visibility = "hidden": }, 4)
22nd Apr 2017, 2:54 PM
Bebida Roja
Bebida Roja - avatar
22nd Apr 2017, 3:02 PM
Calviղ
Calviղ - avatar
+ 2
@Calvin Lee F*** IE
22nd Apr 2017, 3:26 PM
Bebida Roja
Bebida Roja - avatar
+ 2
@Maz I just changed opacity to cross browser, hopefully this time can work on your phone. ☺
22nd Apr 2017, 3:35 PM
Calviղ
Calviղ - avatar