6

저는 부트 스트랩 사스 소스로 구축중인 WordPress 테마가 있습니다. 스타일은 작동하지만 glyphicons의 대부분은 아닙니다 (별표와 플러스 만).일부 부트 스트랩 글리프가 로딩되지 않습니다.

: 그를 기준으로 style.css 및 내 부트 스트랩을 컴파일하고있어의 glyphicons를 (필자는 $icon-font-path: "fonts/"; 설정) 다음은 글꼴의 경로가 올바른지 보여 style.css를 컴파일 내에서 미리보기가 보유하고 fonts라는 폴더가 있습니다 예를 들어
@font-face { font-family: 'Glyphicons Halflings'; 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"); } 
.glyphicon { position: relative; top: 1px; display: inline-block; font-family: 'Glyphicons Halflings'; font-style: normal; font-weight: normal; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } 

, 이러한 작업 :

<span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> 
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> 

그러나이 그렇지 않은 : 여기

<span class="glyphicon glyphicon-thumbs-up" aria-hidden="true"></span> 
<span class="glyphicon glyphicon-heart" aria-hidden="true"></span> 

의는 glyphicon 클래스의 조각 :

.glyphicon-asterisk:before { content: "\2a"; } 
.glyphicon-plus:before { content: "\2b"; } 
.glyphicon-star:before { content: \e006; } 
.glyphicon-thumbs-up:before { content: \e125; } 

때 glyphicons 일 (별표 플러스) 나는 그것이 glyphicon 글꼴을로드 할 경우 볼 수있는 네트워크 탭을 선택하고, 그들은 단지 나타납니다. 그렇지 않으면 글꼴 파일이 네트워크 탭에 표시되지 않습니다 (심지어 404 아님).

+1

저는 부트 덤프 컴파일러가 잘못된 글꼴 파일을 작성하기 전에 얼마전에 기억합니다. 그 당시 아이콘은 잘못된 아이콘을 보여 주거나 알 수없는 문자를 나타내는 작은 사각형으로 남았습니다. 작동하지 않는 아이콘을 사용할 때 사각형이 보입니까? 편집 : 여기에 내가 무슨 말을했는지 보여주는 링크가 있습니다 - http://stackoverflow.com/a/18474869/2375493 –

답변

5

콘텐츠 값이 따옴표로 묶이지 않은 것이 문제였습니다. 여전히 www.getbootstrap.com 새시 소스를 다운로드 할 때 문제가되지만 bootstrap-sass github 저장소에 recently fixed입니다.

+1

당신은 저에게 많은 작업을 저장했습니다! –