I want to have transformed background using @keyframes
. But the text is also scaled and I want to make it without any changes.
I've tried this method but it seems the @keyframes
is the problem.
Maybe it's impossible only with html/css and I should use JS/jquery ?
Or I make some other mistake which I'm not aware of.
#bg {
z-index:1;
background:grey;
position:relative;
width:1000px;
height:400px;
animation:bg 2s ease infinite;
}
@keyframes bg {
from {
transform:none;
}
to {
transform:scale(1.107,1.007);
}
}
ul {
color:white;
list-style-type:none;
position:absolute;
}
<div id="bg">
<div class="menu">
<ul>
<li>item</li>
<li>item</li>
<li>item</li>
</ul>
</div>
</div>