Files
murom/заставка.js

45 lines
935 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function добавитьЭкранЗаставки()
{
var заставка = document.createElement("div");
document.body.appendChild(заставка);
заставка.id = "заставка";
заставка.style.cssText = "position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none;";
заставка.innerHTML =
`
<h1 id = "заголовок">МУРОМ</h1>
`;
var вид = document.createElement("style");
document.head.appendChild(вид);
вид.innerHTML =
`
#заголовок
{
position: absolute;
left: 50%;
top: 50%;
}
#заставка
{
opacity: 1;
background-color: grey;
animation: fadeOut 2s ease;
animation-fill-mode: forwards;
}
@keyframes fadeOut
{
from
{
opacity: 1;
}
to
{
opacity: 0;
}
}
`;
};
муром.старт.подписать(добавитьЭкранЗаставки);