font-size

你必须要知道的移动端开发知识

♀尐吖头ヾ 提交于 2019-12-06 07:51:13
移动开发不同与PC端开发,可能会经历各种意想不到的问题,尤其是移动端应用刚起步的几年;随着移动互联网的快速发展,有些问题已经得到了很好的支持,如1像素边界的问题。当然,要更好地解决这些移动端的问题,就需有移动端领域相关的知识,下面就来说说。 dpr设备像素比 首先说一下,这个dpr不仅仅是移动端才有的,pc端也有,但是对一些移动端的问题产生的原因及解决显得比较重要,比如1像素的问题。先来看几个概念: 物理像素(physical pixel) 一个物理像素就是显示设备上最小的物理显示单元,每个物理像素都有自己的颜色值和亮度值。例如iphone6手机屏幕有750*1334个物理像素 设备独立像素(density-independent 设备独立像素又叫密度无关像素,也可以叫逻辑像素,程序使用的虚拟像素如css像素,可以理解为显示设备坐标系统中的一个点; 设备像素比dpr(device pixel ratio) 设备像素比,简称dpr,定义了物理像素与设备独立像素之间的对应关系,具体的对应关系是一个计算公式如下: dpr = 物理像素 / 设备独立像素 上面计算的dpr是指某一个方向上如x或者y方向,二者dpr值相同;程序中获取dpr方式如下: js获取dpr使用 window.devicePixelRatio css获取dpr使用 -webkit-device-pixel-radio

CSS测试题Ⅱ

你。 提交于 2019-12-06 07:12:43
1.如何使用 CSS3 强制换行? A. word-wrap: break-word; B. text-wrap: break-word; C. text-wrap: force; D. text-width: set; 答案:A. word-wrap: break-word; 2.下面哪个是有效的 CSS3 转换语句? A. matrix() B. modify() C. skip() D. simulate() 答案:A. matrix() 注解:matrix() 方法把所有 2D 转换方法组合在一起 ,matrix() 方法需要六个参数,包含数学函数,允许您旋转、缩放、移动以及倾斜元素。 3.如何使用 CSS3 旋转对象? A. object-rotation: 30deg; B. transform: rotate(30deg); C. rotate-object: 30deg; D. transform: rotate-30deg-clockwise; 答案:B. transform: rotate(30deg); 注解:transform 属性向元素应用 2D 或 3D 转换。该属性允许我们对元素进行旋转、缩放、移动或倾斜。 4.box-shadow 是否支持所有浏览器? A. 正确 B. 错误 答案:A. 正确 5.如果 border-radius 设置为 0

Compounded relative font-sizes: a clean way to adopt the font-size of the child, not the parent element

谁都会走 提交于 2019-12-06 05:50:00
For example, if I have: td { font-size: 1.3em } h2 { font-size: 2em } h3 { font-size: 1.6em } p { font-size: 1.2 } And I have headings/paragraphs inside my table-cells, I know that I can avoid compounding the font-sizes by the following: td h2, td h3, td p { font-size: 1em } Which would result in the headings/paragraphs in my table-cells having font-size of 1.3em (that of the td). But what I'm looking for is a nice, clean way for each child element to have it's original font-size, not that of the parent. I'd really like to avoid doing the following (and of course I'd like to avoid using px):

闲来无事写了一套 Jenkins 主题样式:刀锋

北慕城南 提交于 2019-12-06 04:32:45
背景 Jenkins 的前端 CSS 样式坚挺了这么多年已经觉得腻的不行了,于是想换个风格缓解一下视觉疲劳,便有了这个项目。由于本人不是前端,所以很多只是随便改改,有些复杂的需求也实现不了,但是总的来说,使用还是将就能用。当然,由于新版本项目还是热乎的,所以肯定会有很多兼容性的问题,也欢迎有机会的人能够在评论区或者其他方式给我提出来。 配置 Jenkins 自定义 CSS 样式 做这个之前,首先需要安装一个插件: Simple Theme Plugin 安装完成后重启 Jenkins,此时在系统配置里面: 可以找到我们安装的插件: 第一种方式: 我们可以通过 CSS URL 的形式导入样式: https://github.com/KU4NG/Jenkins-Theme/blob/master/css/jenkins.css 这样你能保证代码是最新的,但是问题就是 github 可能不是很稳定,当然你可以可以下载下来本地部署,然后填写改 css 的地址。 另外一个也是我比较推荐的,使用 Extra CSS 选项,将 CSS 文件内容粘贴到这里保存: 第一版内容如下,可以直接用: *{font-size:13px;font-weight:normal;color:#161823!important;letter-spacing:1px}div{border-radius:0

ckeditor font style 13 px

最后都变了- 提交于 2019-12-06 04:24:24
I had earlier asked question about it. But after trying out all the possiblities where the error occurs, I have found that in ckeditor if you copy some text and paste it, it is default pasted as <p style="font-size: 13px;"> example picture HTML CODE <div><p>Original Text</p> <p><strong><u>The quick brown fox jumps over the lazy dog</u></strong></p> <p>The quick brown fox jumps over the lazy dog</p> <p>Copied Text</p> <p style="font-size: 13px;"><strong><u>The quick brown fox jumps over the lazy dog</u></strong></p> <p style="font-size: 13px;">The quick brown fox jumps over the lazy dog</p> <

WPF font quality

纵然是瞬间 提交于 2019-12-06 04:17:40
问题 I'm developing a WPF app but I've noticed that at certain font sizes the text doesn't render as nicely as the samples you see in Control Panel -> Fonts. I'm using large Segoe UI fonts ( FontSize="36" ), and the effect is more noticeable on the upright lines, e.g. a letter "U" might be slightly thicker on one side than the other. ). The font quality improves at certain font sizes, e.g. FontSize="48" (which I believe is the equivalent of 36pt), but using a limited number of font sizes isn't

Font size discrepancy in .NET GDI+?

别说谁变了你拦得住时间么 提交于 2019-12-05 21:34:45
问题 I am wracking my brains in trying to understand the discrepancy between the font sizes users select or specify (for example, using a FontDialog ) and the em-size reported by the Font class in .NET. For example: using (FontDialog dlg = new FontDialog()) { if (dlg.ShowDialog() == DialogResult.OK) { Console.WriteLine("Selected font size: " + dlg.Font.SizeInPoints.ToString("0.##")); } } Using the above code, you will get some confusing results: Selecting 11 in the dialog produces 11.25 Selecting

Font size for programming? [closed]

流过昼夜 提交于 2019-12-05 21:22:30
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . After reading this question I installed Consolas. The trouble is, now the text seems too small. I have to adjust it to size 12 to use it comfortably. Anyone else experience this when switching to Consolas (or any other font)? Do my eyes just have to adjust to this new font or

文字样式

徘徊边缘 提交于 2019-12-05 20:45:43
一、常用的文字样式 常用的文字样式有字体(font-family),字体大小(font-size),字体样式(font-style),字体的粗细(font-weight),字体大小写(font-variant),通常我们直接用复合样式。 二、常用文字样式实例 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>文字样式</title> <style> /* 1 font-family:字体,默认微软雅黑,可以同时设置多个字体,只有前面的字体没有,就用后面设置的字体*/ /* 2 font-size:字体大小(单位:px,rem, %, em) px:谷歌浏览器默认字体大小为16px,最小识别为12px; rem:相对于html根标签的n倍,如谷歌浏览器的默认字体的大小为16px,那么font-size用rem为单位,那么设定字体的大小为16*n em:父级字体大小*n,假如<div>hello<span>world</span>!</div>,假如div的大小已经设定,那么span可以通过em单位,来设定和父级标签成倍数的大小 % : 同em一样,为父级字体大小*n% */ /*3. font-weight:字体粗细,normal(默认粗细),light(变细), bold(加粗),bolder

【其它】本人博客园主题配置

纵然是瞬间 提交于 2019-12-05 19:31:58
一、选择皮肤 选择博客皮肤:Custom 二、页面定制 CSS 代码 body { background: #fff; min-height: 100%!important; color: #314659!important; font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif!important } a { transition: all .3s ease!important } a:hover { color: #2D8CF0!important; text-decoration: none!important } #ad_c1, #ad_c2, #ad_t2, #author_profile, #blogCalendar, #blogTitle h2, #comment_form_container p:nth-of-type(3), #comments_pager_top, #green_channel, #homepage_top_pager, #sidebar_imagecategory, #sidebar_postarchive, #sidebar_recentcomments, #sidebar_recentposts, #sidebar_scorerank, #sidebar_search