Как На Сайте Сделать Кнопку Наверх?
#61
Отправлено 05 Декабрь 2012 - 18:25
#64
#65
Отправлено 20 Декабрь 2012 - 09:11
#66
Отправлено 20 Декабрь 2012 - 10:08
kaisyRUS (20 Декабрь 2012 - 09:11) писал:
То для этого можно изменить код в файле main.csstemplate.
Найти код:
#back-top { position: fixed; bottom: 30px; margin-left: -150px; right: 30px; z-index: 100; }Заменить:
#back-top { position: fixed; bottom: 30px; margin-left: -150px; right: 30px; z-index: 100; opacity: 0.3;/*уровень прозрачности*/ } #back-top:hover { opacity: 1;/*при наведение мышкой уровенб прозрачности изменится на это*/ }
#67
Отправлено 18 Январь 2013 - 16:15
http://s017.radikal....4caba958a37.jpg
подскажите, что исправить или это так и должно быть?
#68
Отправлено 18 Январь 2013 - 16:53
Eugie89 (18 Январь 2013 - 16:15) писал:
http://s017.radikal....4caba958a37.jpg
подскажите, что исправить или это так и должно быть?
Будьте добры, укажите в профиле номер Вашего магазина, номер аккаунта или адрес, чтобы мы смогли посмотреть в чем может быть причина такого отображения
#70
Отправлено 19 Январь 2013 - 01:36
#back-top { bottom: 30px; margin-left: -150px; position: fixed; right: 30px; }
и заменить на
#back-top { bottom: 30px; margin-left: -150px; position: fixed; right: 30px; z-index: 2; }
#72
Отправлено 20 Январь 2013 - 10:55
[SL-146761]
Спасибо
#73
Отправлено 20 Январь 2013 - 15:17
livem1. (20 Январь 2013 - 10:55) писал:
[SL-146761]
Спасибо
Пришлите пожалуйста скрипт этой кнопки, то есть примерно такой код:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> <script> $(document).ready(function(){ // hide #back-top first $("#back-top").hide(); // fade in #back-top $(function () { $(window).scroll(function () { if ($(this).scrollTop() > 100) { $('#back-top').fadeIn(); } else { $('#back-top').fadeOut(); } }); // scroll body to 0px on click $('#back-top a').click(function () { $('body,html').animate({ scrollTop: 0 }, 800); return false; }); }); }); </script>
#74
Отправлено 25 Январь 2013 - 11:53
position: fixed;
bottom: 15px;
margin-right: -150px;
left: 290px;
opacity: 0.3;/*уровень прозрачности*/
}
#back-top:hover {
opacity: 1;/*при наведение мышкой уровенб прозрачности изменится на это*/
}
#back-top a {
width: 55px;
display: block;
text-align: center;
font: 10px/100% Arial, Helvetica, sans-serif;
text-transform: uppercase;
text-decoration: none;
color: #bbb;
-webkit-transition: 1s;
-moz-transition: 1s;
transition: 1s;
}
#back-top a:hover {
color: #000;
}
#back-top span {
width: 55px;
height: 55px;
display: block;
margin-bottom: 7px;
background: url(http://born2shopping...761/r4.png?8222) no-repeat center center;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
-webkit-transition: 1s;
-moz-transition: 1s;
transition: 1s;
}
#back-top a:hover span {
background-color: #777;
}
#75
Отправлено 25 Январь 2013 - 13:31
#76
Отправлено 26 Январь 2013 - 03:10
$(this).scrollTop() > 400
данная строка находиться в вашем шаблоне "HTML". 400рх это значение при котором будет появляться кнопка.
#77
Отправлено 26 Январь 2013 - 10:52
#78
Отправлено 28 Январь 2013 - 15:11
Vaccina (12 Сентябрь 2012 - 08:48) писал:
Необходимо в файл main.css вставить
#back-top { position: fixed; bottom: 30px; margin-left: -150px; } #back-top a { width: 108px; display: block; text-align: center; font: 11px/100% Arial, Helvetica, sans-serif; text-transform: uppercase; text-decoration: none; color: #bbb; -webkit-transition: 1s; -moz-transition: 1s; transition: 1s; } #back-top a:hover { color: #000; } #back-top span { width: 108px; height: 108px; display: block; margin-bottom: 7px; background: #ddd url(up-arrow.png) no-repeat center center; -webkit-border-radius: 15px; -moz-border-radius: 15px; border-radius: 15px; -webkit-transition: 1s; -moz-transition: 1s; transition: 1s; } #back-top a:hover span { background-color: #777; }
далее скачать изображение, и загрузить его. После изменить путь к этому изображению в строке
url(up-arrow.png)
Далее в самый конец main.js добавим
$(document).ready(function(){ $("#back-top").hide(); $(function () { $(window).scroll(function () { if ($(this).scrollTop() > 250) { $('#back-top').fadeIn(); } else { $('#back-top').fadeOut(); } }); $('#back-top a').click(function () { $('body,html').animate({ scrollTop: 0 }, 800); return false; }); }); });
После в шаблоне "HTML" сразу после <body> вставить
<p id="back-top"> <a href="#top"><span></span>Вверх</a> </p>
сделал все как написали, кнопка не появилась, сайт
#79
Отправлено 28 Январь 2013 - 16:54
В файле "main.csstemplate".
Найти код:
#back-top { position: fixed; bottom: 30px; margin-left: -150px; } #back-top a { width: 108px; display: block; text-align: center; font: 11px/100% Arial, Helvetica, sans-serif; text-transform: uppercase; text-decoration: none; color: #bbb; -webkit-transition: 1s; -moz-transition: 1s; transition: 1s; } #back-top a:hover { color: #000; } #back-top span { width: 108px; height: 108px; display: block; margin-bottom: 7px; background: #ddd url(up-arrow.png) no-repeat center center; -webkit-border-radius: 15px; -moz-border-radius: 15px; border-radius: 15px; -webkit-transition: 1s; -moz-transition: 1s; transition: 1s; } #back-top a:hover span { background-color: #777; }Заменить:
/* Кнопка прокрутки */ #back-top { position: fixed; bottom: 30px; margin-left: 75px; } #back-top a { width: 108px; display: block; text-align: center; font: 11px/100% Arial, Helvetica, sans-serif; text-transform: uppercase; text-decoration: none; color: #bbb; -webkit-transition: 1s; -moz-transition: 1s; transition: 1s; } #back-top a:hover { color: #000; } #back-top span { width: 108px; height: 70px; display: block; margin-bottom: 7px; background: #DDD url(http://fishkinatachku.ru/web/upload/assets/images/125/124268/arrow_up.png) no-repeat center 4px; -webkit-border-radius: 15px; -moz-border-radius: 15px; border-radius: 15px; -webkit-transition: 1s; -moz-transition: 1s; transition: 1s; } #back-top a:hover span { background-color: #777; } /* Кнопка прокрутки конец*/
#80
Отправлено 28 Январь 2013 - 17:44
Количество пользователей, читающих эту тему: 0
0 пользователей, 0 гостей, 0 анонимных