html - am i using @font face incorrectly? -


can tell me why cant seem font work on site

css

@fontface {      font-family: summer;      src: url(/font/codepredators-regular.ttf);  }    p {        color: #000000;       font-size: 1em;       font-family: summer, tahoma, "tungsten bold", arial, sans-serif;  }
<p>this test</p> 

ive tried couple other "methods" nothing seems work ive tried upload font root folder in attempt make url path easier

nothing gives

maybe if see different code help

you have typo, missing - between @font , face,

anyhow, how should use @font-face correctly (using google fonts sample)

@font-face {   font-family: 'open sans';   font-style: normal;   font-weight: 400;   src: local('open sans'), local('opensans'), url(https://fonts.gstatic.com/s/opensans/v13/cjzkeoubrn4kerxqtauh3vtxra8tvwticgirnjhmvjw.woff2) format('woff2'); } 

snippet

@font-face {    font-family: 'open sans';    font-style: normal;    font-weight: 400;    src: local('open sans'), local('opensans'), url(https://fonts.gstatic.com/s/opensans/v13/cjzkeoubrn4kerxqtauh3vtxra8tvwticgirnjhmvjw.woff2) format('woff2');  }  p {    color: #000000;    font-size: 1em;    font-family: 'open sans', tahoma, "tungsten bold", arial, sans-serif;  }
<p>this test</p>


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -