font-family

字体图标总结

孤者浪人 提交于 2019-12-03 23:48:31
字体图标的原理 1.浏览器将内容解析成unicode值,然后根据font-family找到对应的字体文件,在字体文件中根据unicode编码找到对应图标然后渲染出来。 字体图标的使用过程 1.通过@font-face(兼容所有浏览器) 设置字体 font-family 和 字体下载路径 2.(1)直接将unicode 的值写在html中,然后设置它的font-family (2) 将unicode 写在伪类的content 中,然后设置它的 font-family,一般是ico 设置字体,ioc-xxx 设置contont 字体图标的优点: 1. 请求一次字体文件即减少http请求,可以随意改颜色,大小,不失真,兼容性好 缺点:颜色不如真正的图片丰富,维护成本高 来源: https://www.cnblogs.com/chillaxyw/p/11811839.html

CSS(2)---css字体、文本样式属性

喜欢而已 提交于 2019-12-03 12:13:18
css字体、文本样式属性 这篇主要讲CSS文本属性中的: 字体样式属性 和 文本样式属性 。 一、字体样式属性 CSS 字体属性主要包括: 字体设置(font-family) 、 字号大小(font-size) 、 字体粗细(font-weight) 、 字体风格(font-style) 、 字体颜色(color) 。 1、字体设置(font-family) 网页中常用的字体有 宋体、微软雅黑、黑体 等,例如将网页中 所有p标签的字体设置为微软雅黑 ,可以使用如下CSS样式代码: p { font-family:"微软雅黑";} 可以同时指定多个字体,中间以 逗号 隔开,表示如果浏览器不支持第一个字体,则会尝试下一个,直到找到合适的字体。 p {font-family:"微软雅黑",“宋体”,arial;} 注意 1、英文字体不需要加双引号,如:选择器{font-family:arial;} 2、如字体中包含特殊符号必须用双引号括起来,如:选择器{font-family:"Microsoft yahei";} 3、尽量使用系统默认字体,保证在任何用户的浏览器中都能正确显示。 2、字号大小(font-size) p {font-size:15px;} 该属性的值可以使用相对长度单位,也可以使用绝对长度单位。较常用,推荐使用相对长度像素单位px。 建议 1

Customize tinymce 4.0.5 styleselect toolbar menu

匿名 (未验证) 提交于 2019-12-03 08:44:33
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to customize the default styleselect toolbar menu so I can add to it a custom menu element. The idea is to place font size as a styleselect submenu: I initialized a TinyMCE 4.0.5 in the following way: tinymce.init( { language_url : '/webobbywebapp/js/tiny_mce/language/es.js', selector:'textarea', plugins: "image, link, print", toolbar: "styleselect | undo redo | removeformat | bold italic underline | aligncenter alignjustify | bullist numlist outdent indent | link | print | fontselect fontsizeselect", menubar: false, statusbar:

Preloading fonts in Chrome with 'preload' link directive

匿名 (未验证) 提交于 2019-12-03 08:41:19
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: The preload directive is not performing in Chrome as expected. Below is a full HTML page that may be opened in Chrome for results comparison. It should be applying all 5 fonts; instead, it only applies the first preloaded font, makes a faux italic for what should be the second, and simply substitutes the default serif for the remaining 3. Additionally, in the developer's console, this message appears--after about 3 seconds--for each of the five fonts: The resource [URL] was preloaded using link preload but not used within a few seconds from

Change css font-family for separate options in select tag

匿名 (未验证) 提交于 2019-12-03 08:33:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I don't know if this is possible, and if not, if someone can throw out optional ideas, but I'm attempting to display a drop down of different fonts (specifically, font's from Google's font directory) in a select tag. In the drop down, I'm trying to show a preview by styling each option with the font it represents Tangerine This doesn't seem to be working, though. Any clues why or how to fix it? 回答1: You should wrap each option tag in an optgroup tag and then style that as: Arial veranda other 回答2: You cannot set the font of the tag but you

Firefox not recognizing a font

陌路散爱 提交于 2019-12-03 08:19:38
问题 I'm styling the pre HTML element via CSS like this: pre { font-family : "Franklin Gothic Medium","Arial Narrow Bold","Arial",sans-serif; } And it works in Chrome/Chromium, Opera, Safari and IE (meaning that the font is indeed installed in the computer), but not in Firefox. Firefox only recognizes Arial . And I've tried with other custom fonts (like Century Gothic ) and it works, so it's able to recognize custom fonts. Bottom line, Firefox isn't recognizing Franklin Gothic Medium nor Arial

How to use font-family lato? [closed]

眉间皱痕 提交于 2019-12-03 05:23:57
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . How to use font-family lato ? I have used style like this but not working . How can I do ? Thank you. font-family: Lato, Helvetica, sans-serif; link: http://www.google.com/fonts/specimen/Lato 回答1: Please put this code in head section <link href='http://fonts.googleapis.com/css?family=Lato:400,700'

Font Family Open Sans not being used

巧了我就是萌 提交于 2019-12-03 05:09:28
I am using Google's Open Sans Font in my application. I have defined the stylesheet as instructed: <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css'> I then used it on the body selector as: body { font-family: 'Open Sans', sans-serif; } I have not defined font family anywhere else. I assume that since I have defined it at the parent, the child elements will automatically inherit it. However, if I open up the inspector for say an anchor tag in my application and see the computed styles for that tag, I find that (Chrome Latest) the

如何优雅的选择字体(font-family)

一个人想着一个人 提交于 2019-12-03 04:07:41
基础知识 serif和sans-serif字体之间的区别 西文字体分为两大族:衬线体(serif)和无衬线体(sans-serif)。像Times、Times New Roman等都是属于衬线体,而Arial、helvetica则是属于无衬线体。 衬线字体,意思是在字的笔画开始、结束的地方有额外的装饰,而且笔画的粗细会有所不同。 无衬线体是无衬线字体,没有这些额外的装饰,而且笔画的粗细差不多。 在计算机屏幕上,sans-serif字体被认为是比serif字体容易阅读。 字体系列 ont-family 属性设置文本的字体系列。 font-family 属性应该设置几个字体名称作为一种"后备"机制,如果浏览器不支持第一种字体,他将尝试下一种字体。 注意 : 如果字体系列的名称超过一个字,它必须用引号,如Font Family:"宋体"。 各平台的默认字体情况 1、Window下: 宋体(SimSun) :Win下大部分游览器的默认字体, 宋体 在小字号下(如12px、14px)的显示效果还可以接受,但是字号一大就非常糟糕了,所以使用的时候要注意。 微软雅黑("Microsoft Yahei") :从 Vista 开始,微软提供了这款新的字体,一款无衬线的黑体类字体,并且拥有 Regular 、 Bold 两种粗细的字重,显著提高了字体的显示效果

How to include Roboto font in webpack build for Material UI?

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: For a progressive web app based on Material UI (React) and built with Webpack , how do I properly include Roboto font(s) so that the app does not depend on Google servers and fonts also work offline ? The installation page just references the Google fonts page , but that obviously forces fonts to be downloaded from Google servers. A similar Material UI Issue exists regarding Roboto font, but still relies on Google providing the font files. I found a NPM package providing the Roboto font files , but I'm not sure how to include those files as