font-family

CSS字体样式属性

拈花ヽ惹草 提交于 2019-11-30 22:05:12
font-size:字号大小 font-size属性用于设置字号,该属性的值可以使用相对长度单位,也可以使用绝对长度单位。 其中,相对长度单位比较常用,推荐使用像素单位px,绝对长度单位使用较少。具体如下: font-family:字体 font-family属性用于设置字体。网页中常用的字体有宋体、微软雅黑、黑体等,例如将网页中所有段落文本的字体设置为微软雅黑,可以使用如下CSS样式代码: p{ font-family:"微软雅黑";} 可以同时指定多个字体,中间以逗号隔开,表示如果浏览器不支持第一个字体,则会尝试下一个,直到找到合适的字体。 技巧 1. 现在网页中普遍使用14px+。 2. 尽量使用偶数的数字字号。ie6等老式浏览器支持奇数会有bug。 3. 各种字体之间必须使用英文状态下的逗号隔开。 4. 中文字体需要加英文状态下的引号,英文字体一般不需要加引号。当需要设置英文字体时,英文字体名必须位于中文字体名之前。 5. 如果字体名中包含空格、#、$等符号,则该字体必须加英文状态下的单引号或双引号,例如font-family: "Times New Roman";。 6. 尽量使用系统默认字体,保证在任何用户的浏览器中都能正确显示。 CSS Unicode字体 在 CSS 中设置字体名称,直接写中文是可以的。但是在文件编码(GB2312、UTF-8 等

Why is a div longer than several spans with the same content (only in Chrome)

放肆的年华 提交于 2019-11-30 19:18:45
I have two lines of 10000 "." in a monospace font. The first has the whole line in a div, the second is made up of 1000 spans of 10 "."'s each. Here is the JS fiddle link: https://jsfiddle.net/fojp5e9z/2/ Here it is with 5000 characters, it is slightly noticeable at the end. At 10000 you get 2 full periods extra length on the top line. <!DOCTYPE html><html><body> <div style='font-family:monospace'> ......................................................................................................................................................................................................

数据库第二阶段day01 项目实战总结

流过昼夜 提交于 2019-11-30 16:15:29
@font-face { font-family: "Times New Roman"; }@font-face { font-family: "宋体"; }@font-face { font-family: "Calibri"; }@font-face { font-family: "微软雅黑"; }p.MsoNormal { margin: 0pt 0pt 0.0001pt; text-align: justify; font-family: Calibri; font-size: 10.5pt; }p.p { margin: 5pt 0pt; text-align: left; font-family: Calibri; font-size: 12pt; }span.msoIns { text-decoration: underline; color: blue; }span.msoDel { text-decoration: line-through; color: red; }div.Section0 { }div.Section1 { }div.Section2 { }div.Section3 { }div.Section4 { } 案例 1 :配置逻辑卷 (192.168.4.11,192.168.4.22) 一 . 环境准备 : 1. 图形模式下手动添加磁盘 (2

Web 字体 font-family探秘

前提是你 提交于 2019-11-30 12:29:25
之前写过一篇关于Web字体简介及使用技巧的文章: 你该知道的字体 font-family 。 该篇文章基本没有太多移动端的字体选择及分析。并且过了这么久,如今的 Web 字体又有了一些新的东西,遂有此文。 正文从这里开始。 各大网站最新 font-family 作为前端的一个习惯,浏览各个网站的时候总是喜欢打开开发者工具时不时审查元素一下。看了一下一些比较出名的网站移动端的 font-family : 天猫 : font-family: "PingFang SC",miui,system-ui,-apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,sans-serif; Github : font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; CSS-Tricks : font-family: system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui

Is there a trick to show Arial Black in Firefox?

拜拜、爱过 提交于 2019-11-30 11:33:05
Since Arial black is buggy in firefox, is there a way to show it without embedding it with @font-face? https://bugzilla.mozilla.org/show_bug.cgi?id=644385 I've seen a couple of work arounds like using font-weight: 900; font-family:'Arial Black', Gadget, sans-serif; However that method does not work for me. Suggestions? reece The problem (according to the bug) is that the Windows DirectWrite API that Firefox uses treats Arial Black as font-family: Arial; font-weight: bold; ( comment #8 ), so according to comment #10 you need to use: font-family: "Arial Black", Arial; font-weight: 900; Seems

Android WebView safe font family?

两盒软妹~` 提交于 2019-11-30 11:04:33
问题 No, like others, I don't want to use custom fonts. I am looking for list of WebView safe fonts that can be used without using CSS3's custom @font-face, which loads ttf/wof/eot font from web/local storage. More refined question would be: What are the list font's that are included with Android Operating System which can be used inside WebView? For example, Arial, Verdana, sans-serif, etc font can be used (not sure), so where exactly to look for to be 100% sure? Thanks 回答1: Webview : It uses the

how to apply custom font to web browser content WP7

荒凉一梦 提交于 2019-11-30 09:07:27
问题 Am developing simple app for learning webBrowser concept in Windows phone. My aim is to display the content in Telugu(Indian language) in my WP7. that web application is displaying Telugu content only my MainPage.xaml.cs code is : private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e) { webBrowser1.Navigate(new Uri("http://www.eenadu.net", UriKind.Absolute)); } in MainPage.xaml file <phone:WebBrowser HorizontalAlignment="Left" Margin="0,92,0,0" Name="webBrowser1"

Why is a div longer than several spans with the same content (only in Chrome)

与世无争的帅哥 提交于 2019-11-30 03:45:41
问题 I have two lines of 10000 "." in a monospace font. The first has the whole line in a div, the second is made up of 1000 spans of 10 "."'s each. Here is the JS fiddle link: https://jsfiddle.net/fojp5e9z/2/ Here it is with 5000 characters, it is slightly noticeable at the end. At 10000 you get 2 full periods extra length on the top line. <!DOCTYPE html><html><body> <div style='font-family:monospace'> ...............................................................................................

Android WebView safe font family?

混江龙づ霸主 提交于 2019-11-29 23:05:37
No, like others, I don't want to use custom fonts. I am looking for list of WebView safe fonts that can be used without using CSS3's custom @font-face, which loads ttf/wof/eot font from web/local storage. More refined question would be: What are the list font's that are included with Android Operating System which can be used inside WebView? For example, Arial, Verdana, sans-serif, etc font can be used (not sure), so where exactly to look for to be 100% sure? Thanks Webview : It uses the WebKit rendering engine to display web pages According to the source code, android.webkit.WebSettings

How do I Change the FontFamily on a ContentPresenter?

a 夏天 提交于 2019-11-29 22:52:12
I have a custom template for an expander that is close to the code below. I had to change some of the code to take out custom classes, brushes, etc.. <Style TargetType="{x:Type Expander}"> <Setter Property="HorizontalContentAlignment" Value="Stretch" /> <Setter Property="VerticalContentAlignment" Value="Top" /> <Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="FontFamily" Value="Tahoma" /> <Setter Property="FontSize" Value="12" /> <Setter Property="Foreground" Value="Black" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Margin" Value="2,0,0,0" />