font-size

CSS: Scale font-size to fit parent block element height

假装没事ソ 提交于 2019-12-04 05:06:43
问题 Almost every question and answer I have found talks about the viewport size; this isn't really my issues. Take this Pen... https://codepen.io/njt1982/pen/pZjZNM I have a very basic Bootstrap 4 grid like this: <div class="container mt-4"> <div class="row"> <div class="col border"><div class="tile"><span>A</span></div></div> <div class="col border"><div class="tile"><span>B</span></div></div> ... ... </div> <div class="row"> <div class="col border"><div class="tile"><span>A</span></div></div>

博客园页面定制 CSS 代码

僤鯓⒐⒋嵵緔 提交于 2019-12-04 04:58:14
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Page title</title> </head> <body> </body> </html> #EntryTag { margin-top: 20px; font-size: 9pt; color: #808080 } .topicListFooter { text-align: right; margin-right: 10px; margin-top: 10px } #divRefreshComments { text-align: right; margin-right: 10px; margin-bottom: 5px; font-size: 9pt } * { margin: 0; padding: 0 } html { height: 100% } body { color: #999; background-color: #21252b; font-family: "Helvetica Neue",Helvetica,Verdana,Arial,sans-serif; font-size: 12px; min-height: 101%; } table { border-collapse: collapse; border-spacing: 0

How to de- and increase the font size with WKWebView?

£可爱£侵袭症+ 提交于 2019-12-04 04:52:30
In Safari you can increase and decrease the font size. How can I achieve the same effect with WKWebView? The codes suggested by Inna used to work but stopped working from iOS10.3. I did some research and found that we need to make a slight change to it, just changing "%%" to a single "%". So JS code should be: let js = "document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust='\(fontSize)%'" I got this info from Apple Developer forum. https://forums.developer.apple.com/thread/51079 Assume that you have fontUpdatedHeight integer which gives you the exact fontsize. Just create string

In Win7 some fonts don't work like they did in Win2K/XP

时间秒杀一切 提交于 2019-12-04 04:44:36
My question is about how font handling needs to be changed in order to work correctly under Windows 7. I'm sure that I've made an assumption about something that was valid before, but is no longer valid. But I don't even know where to begin looking! I'm praying someone can help! Here are the details as I understand them (I've also posted this question on a Microsoft Windows Developers forum, but they're not answering): Yes, I'm behind the times (heck, I still write WIN32 code in plain C!) I have a 10 yr old DLL I wrote that mimics an even older DOS screen I/O library within the client area of

css中em小于1时chrome字体大小和firefox字体大小不一致的问题

隐身守侯 提交于 2019-12-04 04:42:41
  css中em设置为0.8,结果页面显示,chrome字体比firefox字体大了不少。 chrome有默认字体大小,默认为12px。设置的字体大小小于12px时,也是按照12px来显示。 firefox则是按照字体的实际大小显示。 在css中单位长度用的最多的是px、em、rem,这三个的区别,可以看一下: https://www.cnblogs.com/wind-lanyan/p/6978084.html 可以改一下下css样式,使得chrome中显示小于12px的字体。下面内容转自: https://www.cnblogs.com/jiangxiaobo/p/5669976.html   可以使用Webkit 的内核的 -webkit-text-size-adjust 的私有 CSS 属性来解决,比如下面的代码就可以成功的解决,通过它即可实现字体大小不随终端设备或浏览器影响。样式定义如下:   #chrome10px{ -webkit-text-size-adjust:none; font-size:10px; }   只要 加了 -webkit-text-size-adjust:none; 字体大小 就不受限制了。   但是,在chrome更新到27版本之后就不可以用了。   那此时应该怎么办呢?想一想,还是有办法解决的。   chrome是支持css3的

Android: How to change app font size from code

拈花ヽ惹草 提交于 2019-12-04 03:28:40
问题 I have a requirement where I need to change the application font size based on user provided values. How can I do that? I have googled but it seems that this can only be done is from XML layouts. 回答1: You can alter text size for textviews with textview.setTextSize(int_value); Is this what you meant? 回答2: Call setTextSize() on each TextView (or other widgets that inherit from TextView , such as Button ). 回答3: The only way I can think of is to extend TextView and make them check a global

Font size discrepancy in .NET GDI+?

我与影子孤独终老i 提交于 2019-12-04 03:27:31
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 12 in the dialog produces 12 Selecting 14 in the dialog produces 14.25 Selecting 16 in the dialog

Swift 3 - Adjust Font Size to Fit Width, Multiple Lines

守給你的承諾、 提交于 2019-12-04 03:11:39
I have a UILabel and it is set to 42.0 pt font, and the width of the label is set using autoconstraints based on factors other than the label itself (aka the things to the right and left of the label determine the label's width). I would like to auto-adjust the font size to fit the width of the label, however also break to two lines when it can. Similar to this: I know you can adjust the font size to fit the width of the label, but only when the number of lines is set to 1. How would I accomplish this? Interesting question. Here's my solution: let labelText = self.mylabel.text //where mylabel

Font size for programming? [closed]

隐身守侯 提交于 2019-12-04 02:47:34
Closed . This question is opinion-based. It is not currently accepting answers. Learn more . 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 is it a sign that my eyesight is deteriorating? My resolution is 1280x1024 I use

CSS 字体

痴心易碎 提交于 2019-12-04 02:37:40
CSS字体属性定义字体,加粗,大小,文字样式。 serif和sans-serif字体之间的区别 在计算机屏幕上,sans-serif字体被认为是比serif字体容易阅读 CSS字型 在CSS中,有两种类型的字体系列名称: 通用字体系列 - 拥有相似外观的字体系统组合(如 "Serif" 或 "Monospace") 特定字体系列 - 一个特定的字体系列(如 "Times" 或 "Courier") Generic family 字体系列 说明 Serif Times New Roman Georgia Serif字体中字符在行的末端拥有额外的装饰 Sans-serif Arial Verdana "Sans"是指无 - 这些字体在末端没有额外的装饰 Monospace Courier New Lucida Console 所有的等宽字符具有相同的宽度 字体系列 font-family 属性设置文本的字体系列。 font-family 属性应该设置几个字体名称作为一种"后备"机制,如果浏览器不支持第一种字体,他将尝试下一种字体。 注意 : 如果字体系列的名称超过一个字,它必须用引号,如Font Family:"宋体"。 多个字体系列是用一个逗号分隔指明: 实例 p{font-family:"Times New Roman", Times, serif;} 尝试一下 »