<script type="text/javascript">
jQuery(function () {
jQuery.scrollUp({
// Element ID
scrollName: 'scroll_to_up',
// Distance from top/bottom before showing element (px)
scrollDistance: 359,
// 'top' or 'bottom'
scrollFrom: 'top',
// Speed back to top (ms)
scrollSpeed: 300,
// Scroll to top easing (see http://easings.net/)
easingType: 'linear',
// Fade, slide, none
animation: 'fade',
// Animation speed (ms)
animationSpeed: 200,
// Text for element, can contain HTML
scrollText: 'Scroll To Up',
scrollTrigger: false, // Set a custom triggering element. Can be an HTML string or jQuery object
scrollTarget: false, // Set a custom target element for scrolling to. Can be element or number
scrollTitle: false, // Set a custom <a> title if required.
scrollImg: false, // Set true to use image
activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'
zIndex: 2147483647 // Z-Index for the overlay
});
});
</script>
jQuery(function () {
jQuery.scrollUp({
// Element ID
scrollName: 'scroll_to_up',
// Distance from top/bottom before showing element (px)
scrollDistance: 359,
// 'top' or 'bottom'
scrollFrom: 'top',
// Speed back to top (ms)
scrollSpeed: 300,
// Scroll to top easing (see http://easings.net/)
easingType: 'linear',
// Fade, slide, none
animation: 'fade',
// Animation speed (ms)
animationSpeed: 200,
// Text for element, can contain HTML
scrollText: 'Scroll To Up',
scrollTrigger: false, // Set a custom triggering element. Can be an HTML string or jQuery object
scrollTarget: false, // Set a custom target element for scrolling to. Can be element or number
scrollTitle: false, // Set a custom <a> title if required.
scrollImg: false, // Set true to use image
activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'
zIndex: 2147483647 // Z-Index for the overlay
});
});
#scroll_to_up {display: none}
.selector{
background: center center #fff url(/path/to/image.png) no-repeat; /* полный синтаксис*/
background-position: center center; /*только позиция*/
}
<a href="#" style="background-image: url('http://fess.in.net/wp-content/uploads/2016/01/Block-Home-page3-01.png');background-size: 100% 100%;">
<div class="box">
<div class="name_project"><h3>Your Text</h3></div>
<div class="line_project"></div>
<div class="type"><p>Your Text</p></div>
</div>
<div class="bg"></div>
</a>
$(document).ready(function(){
if (document.location.pathname == '/') {
$('#menu a:first-child').addClass("active");
}
if (document.location.pathname == '/about-us') {
$('#menu a:nth-child(2)').addClass("active");
}
});
#menu .active{
background: orange;
color: #fff;
}