font-size

Why is text rendered with a greater font-size in Opera?

拟墨画扇 提交于 2019-12-19 16:51:30
问题 I'm working on an HTML page that needs to be more or less pixel-perfect, and I noticed that in Opera 10, fonts are rendering larger than they do in other browsers, even though the font-size is effectively the same. Please see this example page in Opera 10 and another browser like Firefox 3.6: http://troy.onespot.com/static/stack_overflow/opera_font_size.html Alternatively, here's a screenshot that illustrates the issue: http://skitch.com/troywarr/d47m1/font-size The red boxes behind the "50px

In email templates, should font-size be in pt or px? [closed]

痞子三分冷 提交于 2019-12-19 06:16:12
问题 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 5 years ago . I am creating an email template, the specs that I am working to have the measurements in MS word font size. Being a print medium, this is in pt . However email is a screen based medium (https://stackoverflow.com/a/3557275/989852). Should the font-sizes (and all other

What does half a pixel mean in the font-size CSS property?

狂风中的少年 提交于 2019-12-19 05:46:44
问题 I'm currently working on a website redesign and I'm receiving a list with the required changes from an agency. The header menu of the site currently has the following styles: line-height: 1em; font-size: 11px; In one of the documents I have received there's a change request that requires me to change those styles to: line-height: 1.2em; font-size: 11.5px; I know that the EMs are OK with the decimal values but what does half a pixel mean in the font size? I have tried to change the font size

rem布局原理深度理解(以及em/vw/vh)

别等时光非礼了梦想. 提交于 2019-12-19 03:22:50
一、前言   我们h5项目终端适配采用的是淘宝那套 《Flexible实现手淘H5页面的终端适配》 方案。主要原理是rem布局。最近和别人谈弹性布局原理,发现虽然已经使用了那套方案很久,但是自己对rem的理解很含糊, 包括vw、vh等。所以打算写博客总结一下,以加深理解。 二、几个概念   这里就不讲那些,物理像素、设备像素比了,可以自己查阅。要去理解rem/em/vm/vh等,首先要直观的去理解他们到底是什么?理解好了,后面就好办了。其实这几个都是css单位,就像我们常用的px一样,只不过他们都是相对单位。我平时使用的百分比单位如:width:100%;就是相对单位。   2.1、em    em作为font-size的单位时,其代表父元素的字体大小,em作为其他属性单位时,代表自身字体大小——MDN   比如父元素font-size:12px;   自身元素如果写成:font-sise:2em;则自身元素用px表示就是24px(相对父元素字体大小);   但是自身元素设置:width:2rem,那么自身元素用px表示就是48px(相对自身字体大小); 2.2、rem    rem作用于非根元素时,相对于根元素字体大小;rem作用于根元素字体大小时,相对于其出初始字体大小——MDN   比如根元素(html)设置font-size=12px; 非根元素设置width:2rem

Disable Chrome minimum font-size 10px

天涯浪子 提交于 2019-12-18 21:27:45
问题 I got some text with font-size:9px But it is displaying correctly in Safari and Firefox but not with Mac/Chrome (V32). Left is chrome [bad] / Right is Safari [correct] I can see in the code inspector that my font is 9px but chrome switch to 10px : I heard about the minimum font size in chrome and tried to disable the auto adjustment by following style but did not work. Any idea? * { -webkit-text-size-adjust: none; } 回答1: i can only tell WHY it's not working but this might help you to go

How to measure the pixel width of a digit in a given font / size (C#)

时光总嘲笑我的痴心妄想 提交于 2019-12-18 21:21:30
问题 I am trying to calculate the pixel width of Excel columns, as described in this post, using the official formula from the OpenXML specification. However, in order to apply this formula, I need to know the Maximum Digit Width of the Normal font, which is the pixel width of the widest numeric digit. The OpenXML specification gives this example as a clarification: Using the Calibri font as an example, the maximum digit width of 11 point font size is 7 pixels (at 96 dpi). I have checked that this

CSS:7个你可能不认识的单位

喜欢而已 提交于 2019-12-18 18:42:38
https://webdesign.tutsplus.com/articles/7-css-units-you-might-not-know-about--cms-22573 众所周知,当使用CSS技术的时候,很容被一些奇异问题给困住。而当我们面对新的问题时,这会让我们处于非常不利的位置。 但是,伴随着Web的发展,新的解决方案也在慢慢成熟。因此,作为一个Web设计和前端开发人员,除了对我们使用的工具或属性非常了解并能熟练运用,已经别无选择了。 这也意味着,对于那些特别的工具或属性,即使平常很少使用,但是当需要的时候,我们也能很好的把它运用到工作中。 今天,我就介绍一些你之前可能不知道的CSS 属性,是一些例如px和ems测量方面的单位,但是很有可能你之前都没听过这些。一起来看看吧。 rem 从与我们已经熟悉的但很相似的单位开始介绍。em被定义为相对于当前对象内文本的字体大小。如果你给body元素设置了一个字体大小,那么body的任何子元素的em值都等于body设置的font-size。 <body> <div class="test">Test</div> </body> body { font-size: 14px; } div { font-size: 1.2em; // calculated at 14px * 1.2, or 16.8px } div中的字体大小是1

Can I change the size of the Xcode IDE fonts?

被刻印的时光 ゝ 提交于 2019-12-18 16:38:48
问题 I'd like to change the font size of the "Groups & Files" panel of the Xcode IDE. I know how to change the "Fonts & Colors" in the preferences, but those (seem to) only affect the code window, not the rest of the IDE. Any ideas? Thanks! 回答1: I believe you can change the size of the Groups & Files pane by setting the PBXTableFontSize parameter in ~Library/Preferences/com.apple.Xcode.plist . This needs PBXTableFont to be set first to take effect. 1) Run defaults write com.apple.Xcode

Select box truncating text when body font size changed via javascript on document ready in IE 9

ⅰ亾dé卋堺 提交于 2019-12-18 15:13:09
问题 IE 9 is behaving quite strangely for me. I've got a page font-size changing control that saves the users setting and then in the document ready sets the body font-size to that size. It works fine, the issue is, when a page with dropdowns loads, in IE 9, sometimes the text is cut off. I've simplified the code down to this jsfiddle to demonstrate. http://jsfiddle.net/z6Paz/3/ the html: <select id="theSelect" name="theSelect" > <option value="2" >Letter ( 8.5 x 11" )</option> <option value="3"

Is there really any point to using relative font sizing in CSS?

断了今生、忘了曾经 提交于 2019-12-18 13:25:20
问题 I've read a lot about the pros and cons of sizing with either relative or absolute font sizes. Fixed sizes don't zoom in IE6 but that's not much of an issue these days. Accessibility is important, but I assume that all good accessibility software is built to deal with these issues? I guess it mainly comes down to whether you want to be able to change all font sizes with one rule (i.e. the default font size you set) or whether you want to be able to change a font size somewhere without