Javascript-форум (https://javascript.ru/forum/)
-   Учебные материалы (https://javascript.ru/forum/study/)
-   -   DOM изменение (https://javascript.ru/forum/study/38511-dom-izmenenie.html)

andrey-kun02 05.06.2013 00:49

DOM изменение
 
Мне нужна вставка .gif анимации загруки и последуещее удаление модуля.
Последнее я знаю :dance: . Но с создением проблемы :help: помогите.

danik.js 05.06.2013 09:54

<style>
.loading{
    background: url(http://www.ajaxload.info/images/indicator.gif);
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -16px;
    margin-left: -16px;
    width: 32px;
    height: 32px;
}
</style>
<body>
<script>
var loading = document.createElement('div');
loading.className = 'loading';
document.body.appendChild(loading);
setTimeout(function() {
    loading.parentNode.removeChild(loading);
}, 3000);
</script>
</body>

рони 05.06.2013 12:30

danik.js, :thanks:
http: -> строка 3


Часовой пояс GMT +3, время: 10:54.