Html5: Input field Using @fontface, non-system fonts. It's possible

The quick question is, is it possible to have an input field on a form using a non-system font in html5 and css3? So, if someone enters into the form field the text can be something like gotham?

+4
source share
2 answers

Nothing special here, just set @font-face as usual:

 @font-face { font-family: "Delicious"; src: url("Delicious-Bold.otf"); } .myinput { font-family: "Delicious"; } 

This works for me on Chrome for OSX

+1
source

Yes it is possible. I just had to remove the @ font-face font from the site on which I applied it, or associate a working example with it.

Here is what I did for CSS:

 @font-face { font-family: 'QuicksandBook'; src: url('/media/fonts/Quicksand_Book.eot'); src: local('Quicksand Book'), local('QuicksandBook-Regular'), url('/media/fonts/Quicksand_Book.ttf') format('truetype'); } html, body, input, textarea { font-family: QuicksandBook, Arial, sans-serif; } 
+2
source

Source: https://habr.com/ru/post/1306751/


All Articles