2014-12-10 3 views
0

저는 이것이 매우 기본적인 질문이라는 것을 압니다 만, 그것은 나를 미치게합니다.HTML 문서에 이미지를 삽입 할 수 없습니다.

내가 작업중인 HTML 문서에 이미지 ("logo_footer.png")를 삽입하려고합니다. 파이썬 웹 응용 프로그램이고 TurboGears 2 Framework를 사용하고 있습니다.

내가 여러 가지 방법을 시도하고, 그들 중 누구도 나를 위해 작동하지 않습니다 :

방법 1 :

.logo-footer { border: 1px solid green; 
       height:140px; width:600px; 
       background:transparent url('{{url2(tg.url("/images/atenea/logo_footer.png"))}}'); 
       background-position:right center !important; 
       background-repeat:no-repeat; 
       background-size:contain; 
       float:left; 
} 

방법 2 : 물론

<div class="pie"> 
    <div class="logo-footer"> 
     <img height="120" src="{{tg.url('/images/atenea/logo_footer.png')}}"> 
    </div> 
    <div class="firma-footer"> 
     <div class="dato-empresa">Blabla</div> 
    </div> 
</div> 

를, 이미지가 존재 . 정말로 기본적인 것을 분명히 여기에서 놓치고 있습니까?

<img> 태그를 사용하여 이미지를 표시 할 수없는 이유는 무엇입니까?

UPDATE : 결국

, 그것은 문제가 내가 PDF 문서에 HTML을 변환 사용하고있어 wkhtmltopdf 라이브러리 것을 밝혀졌다. 어떤 이유로 든 내 이미지가 html 버전에 표시되지만 이미지는 wkhtmltopdf에 의해 생성 된 pDF 버전에는 표시되지 않습니다. 그들이 이미지에 가정

답변

-1
<img height="120" src="images/atenea/logo_footer.png" /> 

는 CSS를 하나 현재 스크립트에서 ateanea 폴더

떨어져 곱슬 년대를 복용

background:transparent url("/images/atenea/logo_footer.png"); 

을 시도하십시오 폴더

관련 문제