웹 사이트에서 svg 파일을 구현하는 데 문제가 있습니다. Inkscape에 필터가 설정되어 있지 않으면 모든 파일이 잘 표시됩니다. .png로 내보내기가 모든 파일에서 잘 작동하지만 필터가있는 파일을 표시하려고 할 때 필터가있는 svg 파일의 모든 부분이 표시되지 않습니다. 필터없이 파일의적용된 필터로 svg 구현하기
예 (... 링크 미안하지만 내가 이미지를 게시 할 충분한 명성 포인트를 가지고 aint을 보인다) :
:
및 필터 세트
보시다시피, (그림자) 필터로 인해 "윗부분"이 표시되지 않습니다.
그래서 필터가있는 svg 파일을 표시 할 수 있습니까? 예를 들어 그림자 효과와 같은 CSS 효과를 사용해야합니까?
많은 감사
편집 :
<img class="svg" src="img/favlabel3.svg">
자바 스크립트가 내가 SVG 사용 : 여기
내 HTML이다는jQuery('img.svg').each(function(){
var $img = jQuery(this);
var imgID = $img.attr('id');
var imgClass = $img.attr('class');
var imgURL = $img.attr('src');
jQuery.get(imgURL, function(data) {
// Get the SVG tag, ignore the rest
var $svg = jQuery(data).find('svg');
// Add replaced image's ID to the new SVG
if(typeof imgID !== 'undefined') {
$svg = $svg.attr('id', imgID);
}
// Add replaced image's classes to the new SVG
if(typeof imgClass !== 'undefined') {
$svg = $svg.attr('class', imgClass+' replaced-svg');
}
// Remove any invalid XML tags as per http://validator.w3.org
$svg = $svg.removeAttr('xmlns:a');
// Replace image with new SVG
$img.replaceWith($svg);
}, 'xml');
});
그림자 필터가 윗부분을 사라지게 만들 수 있다고 생각하지 않습니다. SVG 코드를 게시 할 수 있습니까? –
우리는 svg 파일 (예 : favlabel3.svg)을 볼 필요가 있습니다. –