Tự động thay đổi hình nền cho blog sử dụng CSS
#hinh nen cho blog, #tu dong thay doi hinh nen cho blog, #CSS
Hôm nay mình sẽ giới thiệu cho các bạn cách tự động thay đổi hình nền cho
Để làm được điều này, rất đơn giản bạn chỉ cần thêm đoạn
F5 để xem kết quả!.
blog sử dụng CSS.Để làm được điều này, rất đơn giản bạn chỉ cần thêm đoạn
CSS sau vào trước thẻ ]]></b:skin>.
body{-body{-webkit-animation:colorBackground 50s infinite;-moz-animation:colorBackground 50s infinite;-o-animation:colorBackground 50s infinite;}
@keyframes colorBackground
{
00%{background:url(#link_hinh_anh) no-repeat fixed center;}
10%{background:url(#link_hinh_anh) no-repeat fixed center;}
20%{background:url(#link_hinh_anh) no-repeat fixed center;}
30%{background:url(#link_hinh_anh) no-repeat fixed center;}
40%{background:url(#link_hinh_anh) no-repeat fixed center;}
50%{background:url(#link_hinh_anh) no-repeat fixed center;}
60%{background:url(#link_hinh_anh) no-repeat fixed center;}
70%{background:url(#link_hinh_anh) no-repeat fixed center;}
80%{background:url(#link_hinh_anh) no-repeat fixed center;}
90%{background:url(#link_hinh_anh) no-repeat fixed center;}
100%{background:url(#link_hinh_anh) no-repeat fixed center;}
}
- Tùy chỉnh lạiSau khi thêm xong đoạn mã trên, bạn nhấnthời gianvàhình nềnbạn thích.
Lưu và quay lại blog nhấn phím 