일반 폴리머 2.0 로그인 페이지 응용 프로그램에서 작업 중이며 제목 표시 줄에 사용자 정의 글꼴을 사용하려고합니다. 내 로그인-page.html에서 폴리머에 사용자 정의 글꼴을 사용하는 방법
, 나는 사용자 정의 스타일이 있습니다<custom-style>
<style is="custom-style">
body {
margin: 0;
}
app-toolbar {
background-color: #4F1585;
font-family: 'Roboto', Helvetica, sans-serif;
color: white;
--app-toolbar-font-size: 24px;
}
#maintitle{
color: red;
font-family: 'font-regular';
}
</style>
</custom-style>
그리고 내 헤더/도구 모음 :이 같은 TTF 파일을 가져
<app-header fixed condenses effects="waterfall">
<app-toolbar>
<img src="../icons/app-icon.png" style="height:100%;"/>
<div main-title id="maintitle">Login Page</div>
</app-toolbar>
</app-header>
그리고 :
<link rel="stylesheet" href="../fonts/font-regular.ttf" type="css">
이 코드는 텍스트를 빨간색으로 변경하지만 글꼴은 적용하지 않습니다. 반대로 Times New Roman으로 전환됩니다. 나는 폴리머를 처음 접했을 때, 내가 빠진 것이 있는가?
글쎄, 내 코드에서 나는 그것을하고있다 :'@import url ('https://fonts.googleapis.com/css?family=Montserrat:300,500,700');'그러나 나는 이것에 능하지 않다. 다른 사람들이 대답하게하십시오. 귀하의 경우에는 propably 다음과 같이해야합니다 : http://stackoverflow.com/questions/7961721/how-do-i-i-custom-font-on-an-html-site –
@ KubaŠimonovský 그 답변을 따라했습니다 , 그러나 그것은 일하지 않았다. 나는 더 많은 응답을 기다릴 것이다! – RandomStranger