[Code] Thay Background liên tục

avatar

vi0123998456443
101
10
Punbb
An toàn
Hỗ trợ viên

Bài viết :
43
Points :
101
Like :
10
Punbb
An toàn
Demo:

Code:

    body
    {
    background: url('https://dl.dropbox.com/u/47626020/COO-Style/2x.jpg') no-repeat #FFF fixed;
    animation:mybirst 25s infinite;
    animation-delay:5s;
    -moz-animation-delay:5s; /* Firefox */
    -webkit-animation-delay:5s; /*Safari and Chrome */
    -moz-animation:mybirst 25s infinite; /* Firefox */
    -webkit-animation:mybirst 25s infinite; /* Safari and Chrome */
    }

    @keyframes mybirst

    {
    0%  {background: url('https://dl.dropbox.com/u/47626020/MS_mercedes_wallpaper_1600x1200.jpg') no-repeat #FFF fixed;}
    33%  {background: url('https://dl.dropbox.com/u/47626020/COO-Style/2x.jpg') no-repeat #FFF fixed;}
    66%  {background: url('https://dl.dropbox.com/u/47626020/maplestory_wallpaper_05_1600x1200.jpg') no-repeat #FFF fixed;}
    100% {background: url('https://dl.dropbox.com/u/47626020/MS_mercedes_wallpaper_1600x1200.jpg') no-repeat #FFF fixed;}

    }

    @-moz-keyframes mybirst /* Firefox */

    {
    0%  {background: url('https://dl.dropbox.com/u/47626020/MS_mercedes_wallpaper_1600x1200.jpg') no-repeat #FFF fixed;}
    33%  {background: url('https://dl.dropbox.com/u/47626020/COO-Style/2x.jpg') no-repeat #FFF fixed;}
    66%  {background: url('https://dl.dropbox.com/u/47626020/maplestory_wallpaper_05_1600x1200.jpg') no-repeat #FFF fixed;}
    100% {background: url('https://dl.dropbox.com/u/47626020/MS_mercedes_wallpaper_1600x1200.jpg') no-repeat #FFF fixed;}

    }

    @-webkit-keyframes mybirst /* Safari and Chrome */

    {
    0%  {background: url('https://dl.dropbox.com/u/47626020/MS_mercedes_wallpaper_1600x1200.jpg') no-repeat #FFF fixed;}
    33%  {background: url('https://dl.dropbox.com/u/47626020/COO-Style/2x.jpg') no-repeat #FFF fixed;}
    66%  {background: url('https://dl.dropbox.com/u/47626020/maplestory_wallpaper_05_1600x1200.jpg') no-repeat #FFF fixed;}
    100% {background: url('https://dl.dropbox.com/u/47626020/MS_mercedes_wallpaper_1600x1200.jpg') no-repeat #FFF fixed;}

    }


Tags: #code #hình-ảnh #background #nền #hình #css


Được sửa bởi vi01239984564 ngày 31/8/2016, 7:09 pm; sửa lần 1. (Reason for editing : fix lỗi bbcode)
 Trả lời bài viết
Điểm 4.6/5 dựa vào 87 đánh giá

Có Thể Bạn Quan Tâm

Đang tải...