font-size的一个误区

  项目中有一处需要显示一个小圆点,用的是font-awesome的图标库,随手设置了一个font-size:1px,chrome下显示没有问题,ie下却怎么都显示不出,开始以为是空span在ie下的bug,按stackoverflow的答案修改了样式依然不起作用,最后无意间改了一下font-size发现正常显示出来了。

  查了一下发现,原来在chrome下字体默认最小是12px,如果没有特殊处理的话小于12px的值是不起作用的,所以即使设置为1px在chrome下显示的还是12px大小,但是在ie下就会变得太小甚至看不到了。

时间: 2024-08-25 12:45:01

font-size的一个误区的相关文章

unity UGUI text font size对性能影响巨大

Font Size对ugui text的性能影响非常大. <Cube Duck Run>在itouch5上测试是很流畅的,但是在iphone5上测试,在game over后显示历史最高分时却总会卡好几秒,导致游戏体验极差.使用屏蔽法查了两天终于找到了问题的原因,原来显示历史最高分的text的font size设成了150.其实本来font size为50就够了,但是由于text的父节点上有个0.3倍的缩放,所以导致text的font size设成150其大小在屏幕上看起来才会适,当初编辑界面的

浅谈为什么只有指针能够完成多态及动态转型的一个误区

c++多态由一个函数地址数组Vtable和一个指向Vtable的指针vptr实现. 具体来说,类拥有自己的vtable,类的vtable在编译时刻完成. 每个对象有自己的vptr指针,该指针初始化时指向对象所实现的类的vtable. 关于向上转型的误区: 通常对于向上转型的理解是这样的,当子类对象向上转型(允许隐式)成父类对象时,实际上只是将子类对象暂时看做父类对象,内部的数据并未改变. 对于没有虚函数的对象,这句话是正确的,但是,当引入虚函数后,这样的理解是有问题的,实际上,向上转型的过程中,

Generate eps plot with appropriate font size and line width in GNU Octave

Because eps terminal is different from the one for screen display, the font size and line width should all be adjusted as the following example: clist = GenColorList(); h = 1; figure(h); clf(h); # This is mandatory. ## Set the axis position. Sometime

[Android Tips] 9. framework notification layout font size

android 4.4 framework notification layout 相关字体大小 * title: notification_title_text_size: 18dp * content: notification_text_size: 14dp * subtext: notification_subtext_size: 12dp [Android Tips] 9. framework notification layout font size

latex: font size 修改字体大小的几种方式

参考:Adjusting font size with TikZ picture 调整字体大小的几种方式,大小依次增大,具体如下: \tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge 用法如下: \node (c) at (1,2) {\large x}; 版权声明:本文为博主原创文章,未经博主允许不得转载.

XE6 c++builder 设置 font size GetPropInfo SetOrdProp

TObject* objTemp; objTemp = GetObjectProperty(this, "Font"); if (objTemp) { PPropInfo ppi; ppi = GetPropInfo(objTemp->ClassType(), "Size"); if (ppi && (*ppi->PropType)->Kind == tkInteger) SetOrdProp(objTemp, ppi, 12);

GetPropInfo Font Size

设置font size,遍历所有控件,有的控件没有font属性,所以要用GetPropInfo判断 if (GetPropInfo(cmp, "font")) function GetObjectProperty( const AObject   : TObject; const APropName : string ):TObject; var PropInfo:PPropInfo; begin Result  :=  nil; PropInfo:=GetPropInfo(AObje

LaTeX :font size 修改字体大小的几种方式

调整字体大小的几种方式,大小依次增大,具体如下: \tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge [Reference] 1.Adjusting font size with TikZ picture 原文地址:https://www.cnblogs.com/shenxiaolin/p/10316436.html

UIAlertController custom font, size, color

本文转载至 http://stackoverflow.com/questions/26460706/uialertcontroller-custom-font-size-color up vote2down votefavorite 3 I am using new UIAlertController for showing alerts. I have this code: // nil titles break alert interface on iOS 8.0, so we'll be

Spring事务使用的一个误区

Spring bean 假设有如下类 public class Service implement IService{ @Transactional(readOnly = false, propagation=Propagation.REQUIRED) public void methodA(){ ..... methodB() ...... } @Transactional(readOnly = false, propagation=Propagation.REQUIRES_NEW) publ