我正在做一个CSS的页面加载器,我想出现的标志与滑动覆盖到右边,喜欢的加载栏,但这里想要使加载标志而不是酒吧。下面是我的代码
.underlay{
width: 300px;
height:300px;
margin-left: 300px;
margin-top: 15%;
}
.underlay:before{
content:"";
width: 300px;
height:300px;
position: absolute;
top: 15%;
left: 300px;
z-index: 99;
background: rgba(0,0,0,0.9);
animation-name: slide;
}
<div class="outer">
<div class="underlay">
<img src="logo.png" alt="loading logo">
</div>
</div>我希望滑动它的底图:之前慢慢地滑到右边
发布于 2019-01-30 19:03:30
@Ahtsham Ul Haq:试试这段代码,希望它能为你工作!
.outer {
transition: all 0.3s linear;
}
.underlay img {
width: 300px;
height:300px;
display: block;
left: 10px
/* margin-left: 300px; */
/* margin-top: 15%; */
}
.underlay:before{
content: "";
width: 300px;
height: 300px;
position: absolute;
top: 10px;
/* left: 300px; */
z-index: 99;
background: rgba(0, 0, 0, 0.6);
transition: all 0.3s linear;
}
.outer:hover .underlay:before {
width: 0;
}<div class="outer">
<div class="underlay">
<img src="https://i.ibb.co/8M3cFG4/bbb.jpg" alt="loading logo">
</div>
</div>
发布于 2019-01-31 18:22:50
我有这个,它对我很有效。感谢您的帮助@Asiya Fatima
.underlay:before{
content:"";
width: 300px;
height:300px;
position: absolute;
top: 200px;
left:0;
z-index: 99;
background: rgba(0,0,0,0.9);
animation-name: slide;
animation-duration: 7s;
animation-timing-function: linear;
}
@-webkit-keyframes slide{
0%{
left:510px;
}
100%{
left:850px;
}
}https://stackoverflow.com/questions/54438421
复制相似问题