2014-01-21 4 views
1

Blur.js에 캐시 접두사 란 무엇입니까? 나는 Blur.js의 데모 코드를 시도하고 오류Blur.js의 캐시 접두어 란 무엇입니까?

Failed to load resource: the server responded with a status of 404 (Not Found) https://localhost:44300/none 

나는 그것이 cacheKeyPrefix: 'blurjs-', //Prefix to the keyname in the localStorage object 함께 할 수있는 뭔가가 이해를 얻고있다. 비록 이것을 제외하더라도 나는 여전히 같은 오류를 얻는다. 이것을 가리 키기 위해 나는 어떤 대상을 가지고 있습니까? 링크의 설명서는 제한적입니다. Blur.js 도와주세요.

$('.target').blurjs({ 
    source: 'body',   //Background to blur 
    radius: 5,   //Blur Radius 
    overlay: '',   //Overlay Color, follow CSS3's rgba() syntax 
    offset: {   //Pixel offset of background-position 
     x: 0, 
     y: 0 
    }, 
    optClass: '',   //Class to add to all affected elements 
    cache: false,   //If set to true, blurred image will be cached and used in the future. If image is in cache already, it will be used. 
    cacheKeyPrefix: 'blurjs-', //Prefix to the keyname in the localStorage object 
    draggable: false  //Only used if jQuery UI is present. Will change background-position to fixed 
}); 
+0

왜 당신이 그 변수와 관련이있다 생각으로 Blur.js를 사용할 필요가

<div class="blurry"> <div class="blurrys-kids"><div> </div> <style> .blurry { background: url('../Images/BlurryHasBadKids.jpg');// Important for blurry to have a Background Image } </style> 

같은 DIV? –

+0

파일 경로가 잘못되어로드 할 수 없기 때문에 가능성이 높습니다. – Felix

+0

@PaoloCasciello Blur.js의 최소화 된 스크립트를 사용하고 있습니다. 전체 스크립트로 정확한 라인을 찾으려고합니다. 그러나 최소화 스크립트에서 오류는'CacheKeyPrefix'와 함께 할 sth을 가진 코드 라인을 가리키고 있습니다. –

답변

1

좋아요. 문제가 해결되었습니다. source 변수는 흐려지기를 원하는 이미지가있는 요소를 선택해야합니다.

그래서 내가 가지고있는 경우에 당신이

$('.blurrys-kids').blurjs({ 
    source: '.blurry', 
    overlay: 'rgba(255,255,255,0.33)', 
    radius: 10 
}); 
관련 문제