font-size

UILabel font size?

 ̄綄美尐妖づ 提交于 2019-12-18 10:13:21
问题 I can't seem to modify the font size of a UILabel with the following code: itemTitle.font = [UIFont systemFontOfSize:25]; As i increase the number 25 to something greater, it seems to only add a top margin to the label, which consequently pushes the text down so much, so that the text gets cut off at the bottom or completely overflows. i have another UILabel elsewhere with systemFontOfSize 25, and it's much smaller than the itemTitle text. What's going on? Isn't 25 supposed to be an absolute

Why does Twitter Bootstrap Use Pixels for Font Size?

孤者浪人 提交于 2019-12-18 09:57:27
问题 Given that Twitter Bootstrap is designed to be responsive / device-friendly, why doesn't it use relative font sizes? 回答1: Well it seems that they are hiding behind the browser zoom excuse. Really sad to see such a heavily used and influential framework completely ignore accessibility issues and a fundamental cornerstone of responsive design. They are in a position of great responsibility and unfortunately seem to have no intention of acting accordingly. [Update] So today Mark Otto replied on

CSS: How can I adjust my font size fill all the space in a justified layout?

一曲冷凌霜 提交于 2019-12-18 09:46:12
问题 How can I make my text look like the image below using CSS? 回答1: First of all you need to use a mono-space font. You can find some pretty nice looking ones over at Google Fonts. The font in the image is Ubuntu Mono. Secondly, we are going to be using Viewport Width, or 'vw' unit (If you clicked the link, you'd see that it is well supported by browsers). You need to make sure the top line of text is the width you need it be to fit the width. This also means that each line needs to be it's own

CSS font size using em different on different pages

江枫思渺然 提交于 2019-12-18 07:09:26
问题 CSS is not my forte so this might be something simple. I have set my footer font size in a stylesheet using 0.8em but on different pages it is a different size. I'm only editing someone elses work and he did a poor job at not closing tags so its a bit painful. Is there a way to clear all font settings so that the footer is the same across all pages? Or is this a problem that can be solved some other way? Cheers for any help. 回答1: I notice no one has touched on how em works as a font size unit

WinForms Different DPI Layouts

女生的网名这么多〃 提交于 2019-12-18 05:05:14
问题 Somehow forms and controls created through Visual Studio and the designer have the great ability to scale themselves depending on the current DPI/font size of Windows. One portion of my UI is a tab control full of dynamic pages and labels/inputs generated depending on the user's selection. When these are created, they use hard coded sizes that look right for 96 DPI. Is there an automated way in .Net to take these generated controls and do the same resizing that is performed for the designer

移动端布局方案—vw+rem

人盡茶涼 提交于 2019-12-18 03:27:49
    前言     首先你要知道 vw 和 rem 是什么?怎么使用?      ①: 简单来说 vw 是视口单位,相当于把视口等分成了 100 , 1vw = 1 ;      ②:rem 是相对单位,设置根元素 html 的 font-size ,比如给 html 设置字体大小为 100px , 1rem = 100px ;      注: 我之前针对 vw 和 rem 分别写过一篇博客,详见如下        vw: https://www.cnblogs.com/tu-0718/p/9906692.html        rem: https://www.cnblogs.com/tu-0718/p/9146631.html       正文     还记得第一次知道 rem 时,我的心情如沐春风,感觉找到了新大陆     那时常为移动端写自适应页面而苦恼,传统的百分比布局和媒体查询早已让我心力交瘁     百分比布局的缺点: 宽度虽然能随屏幕自适应,但高度固定不变,当设备屏幕越来越大,会有一种被强行拉伸的既视感,用户体验差     媒体查询的缺点:CSS 代码量增多,体积增大,要为每一个不同分辨率的设备单独写一套样式来自适应,这样的话我宁愿狗带      在这种情况下, rem 的出现无异于黑暗中的一道曙光,不过它也有一个缺点     rem的缺点: 需要引入一段 JS

How to change export PDF font size in datatables?

放肆的年华 提交于 2019-12-18 03:18:05
问题 I have a datatable and i have print button and pdf button. I can change font size when print page but i can't change font size while exporting pdf file. { extend: 'pdfHtml5', text: 'Save PDF', exportOptions: { modifier: { page: 'current' } }, header: true, title: 'My Table Title', orientation: 'landscape' }, { extend: 'print', text: 'Print', customize: function ( win ) { $(win.document.body) .css( 'font-size', '15pt' ) $(win.document.body).find( 'table' ) .addClass( 'compact' ) .css( 'font

difference between parseInt() and parseFloat() [duplicate]

末鹿安然 提交于 2019-12-18 03:16:13
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Behavior difference between parseInt() and parseFloat() var box = $('.box'), fontSize = parseInt(box.css('font-size'), 10) + 5; $('button').on('click', function() { box.animate({fontSize: fontSize}); }); //.. var box = $('.box'), fontSize = parseFloat(box.css('font-size'), 10) + 5; $('button').on('click', function() { box.animate({fontSize: fontSize}) }); what the difference between.. **fontSize = parseInt(box

CSS : Is it possible to adapt font size to div width?

此生再无相见时 提交于 2019-12-18 03:04:41
问题 I have a div with 70% width, and here’s what i want to do: put some words in that div adapt font size so that those words occupy all div width Is this possible with only css? Here is my code: .parent { width:70%; height:auto; min-height:100px; background:red; font-size:10vw; } Please help me to change the font-size dynamically to the parent class <hr> <div class="parent"> This Text </div> Note: the div size is responsive , this is important. Thanks in advance! 回答1: Perhaps not quite what you

Why does user agent stylesheet override my styles? [closed]

南楼画角 提交于 2019-12-18 03:02:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I want a font-size of a 11, but Chrome and Firefox are giving me 16. When I examine the element in Chrome I see and look at the computed property I see: font-size: 16px; table - medium user agent stylesheet Style Attribute - 11px table - medium user agent stylesheet .v11gray - 11px style.css Under computed