2012-08-14 2 views
4

Google 웹 글꼴이 express 3.0에서 작동하는 데 문제가 있습니다.Express에서 작동하지 않는 Google 웹 글꼴

표준 방법으로 글꼴을로드하면 작동하지 않습니다

그러나 다음 중 한 가지 방법에서 글꼴을로드
link(href='http://fonts.googleapis.com/css?family=Crete+Round') 

잘 작동 :

script(type="text/javascript") 
     WebFontConfig = {google: { families: [ 'Crete+Round::latin' ] }}; 
     (function() { 
      var wf = document.createElement('script'); 
      wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; 
      wf.type = 'text/javascript'; 
      wf.async = 'true'; 
      var s = document.getElementsByTagName('script')[0]; 
      s.parentNode.insertBefore(wf, s); 
     })(); 

또는

style 
     @import url(http://fonts.googleapis.com/css?family=Crete+Round); 
+0

이상한 ... 특급 3의 또 다른 새로운 "기능"이 될 수 있을까요? 문제 2 번에 표현식 2에서이 작업을 수행했습니다. html 출력이란 무엇입니까? 이상한 걸 얻었 니? – 3on

+1

'rel = 'stylesheet'type = 'text/css'' 속성을'link' 태그에 추가하면 작동합니까? 익스프레스가 예상하는 HTML을 출력하고 (소스를 확인하는) Express/Jade 문제가 아닙니다. –

+0

@ 3on 예 익스프레스 2에서 어떤 문제도 없었습니다. – jwerre

답변

2

CSS를 포함하지 않는 Express 3.0.0rc2와 비슷한 문제가 있습니다. 나는 이것이 옥 또는 익스프레스 문제입니다 있는지 확실하지 않습니다하지만 작업 style.css를 추가 할 때 그렇게 같이 잘 작동합니다 : 그 줄을 제거하고 삽입 할 경우, 트위터 부트 스트랩 CSS를 말한다, 그러나

link(rel='stylesheet', href='/stylesheets/style.css') 

파일, 나는 이상한 HTML 출력을 얻는다.

link(rel='stylesheet', href='/bootstrap/css/bootstrap.min.css') 

나는 이런 식으로 뭔가있을 경우에만 작동 :

link(rel='stylesheet', href='/bootstrap/css/bootstrap.min.css') 
link(rel='stylesheet', href='/bootstrap/css/bootstrap-responsive.min.css') 
link(rel='stylesheet', href='/stylesheets/style.css') 

왜? 나는 모른다. :-) 나는 그것이 파싱과 HTML 출력과 관련이 있다고 가정한다.

관련 문제