Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[ВОПРОС] ipb меняющийся фон через время

Featured Replies

Posted

Как реализовать  меняющийся фон разных картинок для ipb через время,например 5сек.

 

ВтиканулO.o, перенесите в Техническая поддержка IP.Board

Edited by usergeuv1

Глобальные --> globalTemplate

Находим:

<body id='ipboard_body'>

 

Ниже вставляем:

<script type="text/javascript">
theTime = new Date();
theHour = theTime.getHours();
theMinute = theTime.getMinutes();
if(theHour>=9&&theHour<=17){
document.body.style.cssText = "background: #59b0ee url('http://site.ru/public/style_images/vash_stil/_backgrounds/bg1.jpg') top center repeat-x";
}
else if(theHour>6&&theHour<9){
document.body.style.cssText = "background: #26abf6 url('http://site.ru/public/style_images/vash_stil/_backgrounds/bg2.jpg') top center repeat-x";
}
else if(theHour>17&&theHour<21){
document.body.style.cssText = "background: #26abf6 url('http://site.ru/public/style_images/vash_stil/_backgrounds/bg3.jpg') top center repeat-x";
}
else{
document.body.style.cssText = "background: #155e87 url('http://site.ru/public/style_images/vash_stil/_backgrounds/bg4.jpg') top center repeat-x";
}
</script>

 

если ваше время:

- больше или равно 9 и меньше или равно 17 - устанавливается bg1.jpg из папки _backgrounds
- больше 6 и меньше 9 - устанавливается bg2.jpg из папки _backgrounds
- больше 17 и меньше 21 - устанавливается bg3.jpg из папки _backgrounds
- в остальное время - устанавливается bg4.jpg из папки _backgrounds

Не забудьте загрузить сами фоновые изображения в папку _backgrounds вашего стиля! А так же не забудьте поменять в коде

http://site.ru/

на адрес Вашего сайта 

/ваш_стиль/

 

5 часов назад, Back сказал:

- больше или равно 9 и меньше или равно 17 - устанавливается bg1.jpg из папки _backgrounds
- больше 6 и меньше 9 - устанавливается bg2.jpg из папки _backgrounds
- больше 17 и меньше 21 - устанавливается bg3.jpg из папки _backgrounds
- в остальное время - устанавливается bg4.jpg из папки _backgrounds

Походу здесь все норм описаные.

  • Author

Спасибо ребята  за ответы. Вот нашол интересующий мня скрипт 

<style>
ul#fonstyly {
list-style:none;
}
.dsimageanimation {
margin:0;
width:100%;
height:100%;
top:0px;
left: 0px;
z-index: -1;
}
.dsimageanimation li#fonlink span#fondrive {
width: 100%;
height: 100%;
position: absolute;
top: 0px;
left: 0px;
background-size:100% 100%;
-moz-background-size:100% 100%;
-webkit-background-size:100% 100%;
-o-background-size:100% 100%;
-ms-background-size:100% 100%;
background-repeat: none;
background-attachment: fixed;
opacity: 0;
z-index: -1;
-webkit-backface-visibility: hidden;
-webkit-animation: imageAnimation 36s linear infinite 0s;
-moz-animation: imageAnimation 36s linear infinite 0s;
-o-animation: imageAnimation 36s linear infinite 0s;
-ms-animation: imageAnimation 36s linear infinite 0s;
animation: imageAnimation 36s linear infinite 0s;
}
.dsimageanimation li#fonlink:nth-child(1) span#fondrive {
background-image: url(http://сайт.ru/script/img/css/cssfon_7.jpg);
}
.dsimageanimation li#fonlink:nth-child(2) span#fondrive {
background-image: url(http://сайт.ru/script/img/css/cssfon_2.jpg);
-webkit-animation-delay: 6s;
-moz-animation-delay: 6s;
-o-animation-delay: 6s;
-ms-animation-delay: 6s;
animation-delay: 6s;
}
.dsimageanimation li#fonlink:nth-child(3) span#fondrive {
background-image: url(http://сайт.ru/script/img/css/cssfon_3.jpg);
-webkit-animation-delay: 12s;
-moz-animation-delay: 12s;
-o-animation-delay: 12s;
-ms-animation-delay: 12s;
animation-delay: 12s;
}
.dsimageanimation li#fonlink:nth-child(4) span#fondrive {
background-image: url(http://сайт.ru/script/img/css/cssfon_4.jpg);
-webkit-animation-delay: 18s;
-moz-animation-delay: 18s;
-o-animation-delay: 18s;
-ms-animation-delay: 18s;
animation-delay: 18s;
}
.dsimageanimation li#fonlink:nth-child(5) span#fondrive {
background-image: url(http://сайт.ru/script/img/css/cssfon_5.jpg);
-webkit-animation-delay: 24s;
-moz-animation-delay: 24s;
-o-animation-delay: 24s;
-ms-animation-delay: 24s;
animation-delay: 24s;
}
.dsimageanimation li#fonlink:nth-child(6) span#fondrive {
background-image: url(http://сайт.ru/script/img/css/cssfon_6.jpg);
-webkit-animation-delay: 30s;
-moz-animation-delay: 30s;
-o-animation-delay: 30s;
-ms-animation-delay: 30s;
animation-delay: 30s;
}
@-webkit-keyframes imageAnimation {
0% { opacity: 0;
-webkit-animation-timing-function: ease-in; }
8% { opacity: 1;
-webkit-animation-timing-function: ease-out; }
17% { opacity: 1 }
25% { opacity: 0 }
100% { opacity: 0 }
}
@-moz-keyframes imageAnimation {
0% { opacity: 0;
-moz-animation-timing-function: ease-in; }
8% { opacity: 1;
-moz-animation-timing-function: ease-out; }
17% { opacity: 1 }
25% { opacity: 0 }
100% { opacity: 0 }
}
@-o-keyframes imageAnimation {
0% { opacity: 0;
-o-animation-timing-function: ease-in; }
8% { opacity: 1;
-o-animation-timing-function: ease-out; }
17% { opacity: 1 }
 25% { opacity: 0 }
100% { opacity: 0 }
}
@-ms-keyframes imageAnimation {
0% { opacity: 0;
-ms-animation-timing-function: ease-in; }
8% {opacity: 1;
-ms-animation-timing-function: ease-out; }
17% { opacity: 1 }
25% { opacity: 0 }
100% { opacity: 0 }
}
@keyframes imageAnimation {
0% { opacity: 0;
animation-timing-function: ease-in; }
8% { opacity: 1;
animation-timing-function: ease-out; }
17% { opacity: 1 }
25% { opacity: 0 }
100% { opacity: 0 }
}
</style>
<ul class="dsimageanimation" id="fonstyly">
<li id="fonlink"><span id="fondrive"></span></li>
<li id="fonlink"><span id="fondrive"></span></li>
<li id="fonlink"><span id="fondrive"></span></li>
<li id="fonlink"><span id="fondrive"></span></li>
<li id="fonlink"><span id="fondrive"></span></li>
<li id="fonlink"><span id="fondrive"></span></li>
</ul>

 

Тему можно закрыть

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.