font-size

Minimum Font Size deprecated on ios version 6.0

萝らか妹 提交于 2019-12-03 06:26:08
问题 I just upgraded to xcode 4.5 with iOS 6.0 and it's highlighting a warning on all the UILabels in my XIB files saying "minimum font size deprecated on ios version 6.0". Does anyone know what this is referring to and how to fix it? Update: image is no more available (was at https://skitch.com/hahmadi82/eyk51/cloud) 回答1: minimumFontSize property of the UILabel is deprecated from iOS 6.0 onwards. An Alternative to the minimumFontSize is minimumScaleFactor . If you assign minimumFontSize

ContentEditable - Get current font color/size

China☆狼群 提交于 2019-12-03 05:59:10
问题 I'm working on Rich Text Editor for web browser and I want to work with values of current font color and size in the RTE/ContentEditable element. Is there some preselected function to get these values, like execCommand, which is connected directly with ContentEditable element? Or should I use some text range jQuery library which will get these properties? 回答1: You can use document.queryCommandValue() to get the colour and font size of the current selection in all major browsers: Live demo:

How to change fontsize in direct.label?

非 Y 不嫁゛ 提交于 2019-12-03 05:44:59
I can't change the fontsize in a direct.label (from the directlabels package) ggplot2 plot. See below for a reproducible example - there's no problem in rotating the labels 45 degrees, making them bold, serif, and 50% transparent (all the other arguments in the list at the end of the code below) - but I can't control the fontsize. (I don't really want them to be 25, this is just for testing....) Is there something I'm missing, or is this a bug? library(ggplot2) library(scales) library(directlabels) df <- data.frame(x = rnorm(26), y=rnorm(26), let=letters) p <- ggplot(df, aes(x, y, color=let))

Best unit for font-sizes in CSS

老子叫甜甜 提交于 2019-12-03 05:37:36
What are the advantages & disadvantages of each? em , px , % and pt ? My current choice are percentages, the only reason is because I can globally change the font-size of all elements, just by modifying the font size on the root element (body) I would recommend EM — simply because I use Baseline CSS for my basic set up of forms, layout and most importantly type. Can't recommend it enough : http://baselinecss.com/ My original design training said em's where possible. I believe a main reason was that different browsers and devices have different resolutions, which is once again becoming a big

Adjust font size of Android WebView

二次信任 提交于 2019-12-03 04:44:30
How do you adjust the font size of an Android WebView ? The following appears to have no effect: private void fontSizePlus() { fontSize = (fontSize < FONT_SIZE_MAX) ? fontSize + FONT_SIZE_INCREMENT : fontSize; this.changeFontSize(fontSize); } private void fontSizeMinus() { fontSize = (fontSize > FONT_SIZE_MIN) ? fontSize - FONT_SIZE_INCREMENT : fontSize; this.changeFontSize(fontSize); } private void changeFontSize(int value) { String js = "document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust= '" + value + "%';"; mWebView.loadUrl("javascript:(function() { " + js + " })()"); }

解决图片间间距的几种方法

孤街浪徒 提交于 2019-12-03 04:32:21
当我们使用多个img标签时就会遇到img自带间距的问题如下 解决这个问题很多种方法,下面来简单说一下 1.如果只想解决解决竖向的间距 只需用vertical-align这个属性就可以了 img{ vertical-align: top; } 或者给img标签的父元素加上line-height属性 div{ line-height: 0; } 如果图片很宽一个就占一行的画,比如移动端的长图,给图片加display:block;就可以了; 2.如果只想解决左右的间距问当然可以把四周的间距都取消,然后加margin或者padding,但在网上发行有朋友在img标签左右加上注释包裹,亲测有效果 <img src="./temimage.jpg" alt=""><!-- --><img src="./temimage.jpg" alt=""><!-- --><img src="./temimage.jpg" alt=""><!-- --><img src="./temimage.jpg" alt=""><!-- --><img src="./temimage.jpg" alt=""><!-- --><img src="./temimage.jpg" alt=""><!-- --><img src="./temimage.jpg" alt=""><!-- --><img src=".

前端开发入门到实战:通过 rem 和 vw 实现页面等比例缩放自适应

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 04:16:18
一、rem 和 vw 简介 1. rem rem 是相对长度单位,是指相对于根元素(即html元素)font-size(字号大小)的倍数。 浏览器支持: Caniuse 示例 若根元素 font-size 为 12px html { font-size: 12px; } h1 { font-size: 2rem; /* 2 × 12px = 24px */ } p { font-size: 1.5rem; /* 1.5 × 12px = 18px */ } div { width: 10rem; /* 10 × 12px = 120px */ } 若根元素 font-size 为 16px html { font-size: 16px; } h1 { font-size: 2rem; /* 2 × 16px = 32px */ } p { font-size: 1.5rem; /* 1.5 × 16px = 24px */ } div { width: 10rem; /* 10 × 16px = 160px */ } 2. vw vw 是相对长度单位,相对于浏览器窗口的宽度,浏览器窗口宽度被均分为100个单位的vw 浏览器支持: Caniuse Opera Mini不支持该属性 示例 当浏览器窗口宽度为320px时,1vw = 3.2px p { font-size: 5vw; /

响应式布局与自适应布局的区别

假装没事ソ 提交于 2019-12-03 04:14:39
rem ·rem单位:CSS3 新增的一个相对单位;相对于根元素html的font-size的值进行动态计算得到的,如font-size:14px,1rem = 14px。 例:根据当前屏幕宽度和设计稿宽度计算html-fontsize的值 设计稿宽度:640px,fontsize:14px,屏幕宽度是375px,则font-size = 375/640*14 即:375/600 = fontsize/14 如果html的fontsize的值改变了,之前设定的所有rem单位的值自动会跟着放大或者缩小;目前移动端响应式布局,推荐使用 rem。 注意:rem需要配合媒体查询才可实现响应式布局 em ·em单位:相对于父元素字体大小,默认情况下,1em = 16px 一般适用于响应式,但不推荐使用,计算比较繁琐。 vw/vh vw单位:viewpoint width 视窗宽度的百分比(1vw 代表视窗的宽度为 1%) vh单位:viewpoint height 视窗高度的百分比(1vh 代表视窗的高度为 1%) 一般适用于百分比布局。 响应式布局和自适应布局区别 1.自适应布局通过检测视口分辨率,来判断当前访问的设备是:pc端、平板、手机,从而请求服务层,返回不同的页面; 响应式布局通过检测视口分辨率,针对不同客户端,在客户端做代码处理,来展现不同的布局和内容。 2

How can we increase the font size in toast?

早过忘川 提交于 2019-12-03 04:08:25
问题 Is there any way to increase the font size in toast without customizing? I don't want to create a layout for increasing the text size. Is there any way? Thanks, Niki 回答1: I believe it is achieveable by this: ViewGroup group = (ViewGroup) toast.getView(); TextView messageTextView = (TextView) group.getChildAt(0); messageTextView.setTextSize(25); 回答2: this is ... Toast toast = Toast.makeText(context, R.string.yummyToast, Toast.LENGTH_SHORT); //the default toast view group is a relativelayout

CSS/Javascript fluid font size

大兔子大兔子 提交于 2019-12-03 03:55:29
My application has two views, a live mode and a preview mode. Both of these have windows which can be resized. They are the same html file. I am looking for a way to get the font-size to resize proportionally for both views when they are resized. I am using jQuery as my javascript framework. Is there a way of getting this to work in either CSS or jQuery? I know I am answering my own question, but the answer above was helpful but not enough to suffice as one. So this is how I ended up doing it. First I set up this function which calculates a suitable font size based on a given width. function