CSS3 background image transition

前端 未结 13 2339
梦如初夏
梦如初夏 2020-11-22 07:07

I\'m trying to make a \"fade-in fade-out\" effect using the CSS transition. But I can\'t get this to work with the background image...

The CSS:



        
13条回答
  •  耶瑟儿~
    2020-11-22 07:49

    Try this, will make the background animated worked on web but hybrid mobile app not working

    @-webkit-keyframes breath {
     0%   {  background-size: 110% auto; }
     50%  {  background-size: 140% auto; }
     100% {  background-size: 110% auto; }      
    }
    body {
       -webkit-animation: breath 15s linear infinite;
       background-image: url(images/login.png);
        background-size: cover;
    }
    

提交回复
热议问题