2017-05-21 5 views
0

Ich versuche, auf eigene Schriftart über _Layout.cshtml drehenBenutzerdefinierte Schriftart in ASP.NET MVC

Hier Datei ist Code:

<head> 
<meta charset="utf-8" /> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<title>@ViewBag.Title - My ASP.NET Application</title> 
<style type="text/css"> 
    @@font-face { 
     font-family: "San Francisco"; 
     font-weight: 400; 
     src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-regular-webfont.woff"); 
    } 

    .Text { 
     font-family: "San Francisco"; 
    } 
</style> 
@Styles.Render("~/Content/css") 
@Scripts.Render("~/bundles/modernizr") 

Aber meine Schrift ist noch Helvetica.I haben noch keine Fehler in der Entwicklungskonsole

Wo ist mein Problem?

Danke für Ihre Hilfe!

Antwort

0

fand ich Lösung

I CSS diese in

@font-face { 
     font-family: "San Francisco"; 
     font-weight: 400; 
     src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-regular-webfont.woff"); 
    } 

und diese

.mydiv { 
font-family: San Francisco 

}

danach nur verwenden diese Klasse in HTML schreiben.

Verwandte Themen