Jump to content
CMSTOOLS.org - форум поддержки и развития CMS

Как подключить шрифт в css

Recommended Posts


Сайт https://4coders.pro/Unbrokenteam/index.html

Подключал шрифт по этим статьям:

В папку fonts на хостинге закачал Open Sans https://cloud.mail.ru/public/DsqH/bHBMnPvMv

В css прописал:

@font-face {
font-family: 'Open Sans';
font-weight: normal;
font-style: normal;
src: url(/fonts/OpenSans-Regular.eot); /* IE9 Compat Modes */
src: url(/fonts/OpenSans-Regular.eot#iefix) format('embedded-opentype'),
url(/fonts/OpenSans-Regular.woff) format('woff'),
url(/fonts/OpenSans-Regular.ttf) format('truetype'),
url(/fonts/OpenSans-Regular.svg#OpenSans-Regular) format('svg');
@font-face {
font-family: 'Open Sans';
font-weight: 700;
font-style: normal;
src: url(/fonts/OpenSans-Bold.eot); /* IE9 Compat Modes */
src: url(/fonts/OpenSans-Bold.eot) format('embedded-opentype'),
url(/fonts/OpenSans-Bold.woff) format('woff'),
url(/fonts/OpenSans-Bold.ttf) format('truetype'),
url(/fonts/OpenSans-Bold.svg#OpenSans-Bold) format('svg');

и применил здесь:

background-color: #FEE3B0;
padding: 20px;
font-family: "Open Sans";
background-color: white;
padding: 20px;
font-family: "Open Sans";

Я все правильно сделал?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...