Witam,
mam problem, który jest spowodowany prawdopodobnie jakimś błędem w chrome, ponieważ w każdej innej przeglądarce wszystko wygląda dobrze.
Otóż mam tło typu gradient:
body {
height: 100%;
background: #242a2d; /* Old browsers */
background: -moz-linear-gradient(top, #242a2d 0%, #394248 100%) no-repeat #394248; /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#242a2d), color-stop(100%,#394248)) no-repeat #394248; /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #242a2d 0%,#394248 100%) no-repeat #394248; /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #242a2d 0%,#394248 100%) no-repeat #394248; /* Opera 11.10+ */
background: -ms-linear-gradient(top, #242a2d 0%,#394248 100%) no-repeat #394248; /* IE10+ */
background: linear-gradient(to bottom, #242a2d 0%,#394248 100%) no-repeat #394248; /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#242a2d', endColorstr='#394248',GradientType=0 ) no-repeat #394248; /* IE6-9 */
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
Gradient na każdej podstronie wygląda bardzo dobrze poza galerią ze skryptem fancybox, na której nagle zamiast gradientu, na wysokości zdjęć pojawiają się dziwne schodki:
www.tinyurl.com/c8eazsh
A tutaj zrzut gdyby ktoś nie miał przeglądarki chrome:
http://s14.postimage.org/adjfchsdd/Clipboard01.jpgCo ciekawe, po naciśnięciu klawisza f11 w chrome błąd znika, podobnie jak i przy kliknięciu na dowolne zdjęcie.
Kod poprzez, który wrzucam zdjęcia:
<a class="fancybox-effects-d" href="galeria/1.jpg" data-fancybox-group="gallery" title="galeria"><img src="galeria/1_small.jpg" alt="" /></a>
Część od fancyboxa, którą mam w head:
<script type="text/javascript" src="fancybox/jquery.fancybox.js?v=2.1.4"></script> <link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox.css?v=2.1.4" media="screen" /> <link rel="stylesheet" type="text/css" href="fancybox/helpers/jquery.fancybox-buttons.css?v=1.0.5" /> <script type="text/javascript" src="fancybox/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script> <link rel="stylesheet" type="text/css" href="fancybox/helpers/jquery.fancybox-thumbs.css?v=1.0.7" /> <script type="text/javascript" src="fancybox/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script> <script type="text/javascript"> $(document).ready(function() {
/*
* Simple image gallery. Uses default settings
*/
$('.fancybox').fancybox();
/*
* Different effects
*/
// Change title type, overlay closing speed
$(".fancybox-effects-a").fancybox({
helpers: {
title : {
type : 'outside'
},
overlay : {
speedOut : 0
}
}
});
// Disable opening and closing animations, change title type
$(".fancybox-effects-b").fancybox({
openEffect : 'true',
closeEffect : 'none',
helpers : {
title : {
type : 'over'
}
}
});
// Set custom style, close if clicked, change title type and overlay color
$(".fancybox-effects-c").fancybox({
wrapCSS : 'fancybox-custom',
closeClick : true,
openEffect : 'true',
helpers : {
title : {
type : 'inside'
},
overlay : {
css : {
'background' : 'rgba(0,0,0,0.0)'
}
}
}
});
// Remove padding, set opening and closing animations, close if clicked and disable overlay
$(".fancybox-effects-d").fancybox({
padding: 0,
openEffect : 'elastic',
openSpeed : 150,
closeEffect : 'elastic',
closeSpeed : 150,
closeClick : true,
helpers : {
overlay : true
}
});
/*
* Button helper. Disable animations, hide close button, change title type and content
*/
$('.fancybox-buttons').fancybox({
openEffect : 'none',
closeEffect : 'none',
prevEffect : 'none',
nextEffect : 'none',
closeBtn : false,
helpers : {
title : {
type : 'inside'
},
buttons : {}
},
afterLoad : function() {
this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
}
});
/*
* Thumbnail helper. Disable animations, hide close button, arrows and slide to next gallery item if clicked
*/
$('.fancybox-thumbs').fancybox({
prevEffect : 'none',
nextEffect : 'none',
closeBtn : false,
arrows : false,
nextClick : true,
helpers : {
thumbs : {
width : 50,
height : 50
}
}
});
/*
* Media helper. Group items, disable animations, hide arrows, enable media and button helpers.
*/
$('.fancybox-media')
.attr('rel', 'media-gallery')
.fancybox({
openEffect : 'none',
closeEffect : 'none',
prevEffect : 'none',
nextEffect : 'none',
arrows : false,
helpers : {
media : {},
buttons : {}
}
});
/*
* Open manually
*/
$("#fancybox-manual-a").click(function() {
$.fancybox.open('1_b.jpg');
});
$("#fancybox-manual-b").click(function() {
$.fancybox.open({
href : 'iframe.html',
type : 'iframe',
padding : 5
});
});
$("#fancybox-manual-c").click(function() {
$.fancybox.open([
{
href : '1_b.jpg',
title : 'My title'
}, {
href : '2_b.jpg',
title : '2nd title'
}, {
href : '3_b.jpg'
}
], {
helpers : {
thumbs : {
width: 75,
height: 50
}
}
});
});
});
Próbowałem usunąć pliki css od fancyboxa, ale błąd dalej występował, dopiero po usunięciu z head plików *.js błąd znikł, ale też oczywiście fancybox przestał działać. To są dwa pliki jquery.fancybox-thumbs i jquery.fancybox-media.
http://wklej.se/fa30 i
http://wklej.se/bac3Próbowałem rozwiązać problem poprzez zmianę atrybutów w plikach css fancyboxa z np absolute na fixed, ale w niczym to nie pomogło.
Czy ktoś ma jakiś pomysł jak ten problem rozwiązać?