2016-09-02 1 views
0

私はDjangoで作業しています。グリフコンのCSSファイルを読み込もうとすると、そのアイコンを使用できます。 "bootstrap.css"という名前のcssファイルをブートストラップからダウンロードし、このファイルを "css"ディレクトリのstaticsファイルにアップロードします。グリフコンのカントリーcss。 bootstrap - django

静的ファイルが問題ではなく、 "cssディレクトリ"に置かれた別のcssファイルが読み込まれているためです。 "bootstrap.css"を静的ファイルにアップロードするのではなく、もっとアクションを行うべきですか?私はそのCSSファイルのための "マップ"ファイルを(downliaded zipファイルに)見たが、私はそれが接続したとは思わなかった。

答えて

1

あなたはフォントをglyphiconダウンロードして(あなたのbootstrap.cssへの相対パスを)../fontsディレクトリにそれらを配置する必要があるので、あなたのパス構造が似ている:「bootstrap.css」ラインでのパスで

your_static_dir 
├── css 
│   └── bootstrap.css 
└── fonts 
   ├── glyphicons-halflings-regular.eot 
   ├── glyphicons-halflings-regular.svg 
   ├── glyphicons-halflings-regular.ttf 
   └── glyphicons-halflings-regular.woff 
+0

ありがとう!今仕事。 bootstrap.cssに記載されているパスが見えました。 –

0

外観266

src: url('../fonts/glyphicons-halflings-regular.eot'); 
src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); 
  • 静的
    • CSS の
      • bootstrap.css
      • bootstrap.css.map
      • ...
    • フォント
      • glyphicons -.... EOT
      • glyphicons -.... svg
      • glyphicons -.... ttf
      • グリフィンアドオン-.... WOFF
      • glyphicons -.... woff2
    • JS
      • ...
関連する問題