1:px:这个应该是国内使用较多的单位,意思为像素。因此,其视觉的呈现效果是与分辨率相关的。例如在1024*768分辨率下看12px的字体就比960*640下看到的“小”,其实字体像素未改变,所以觉得在高分辨率下要小,在低分辨率下要大。默认浏览器采用16px的呈现方式。如果设置字体单位为 %,例如:...
分类:
Web程序 时间:
2015-07-21 16:44:06
阅读次数:
147
inv[x] = ( Mod - Mod /x ) * inv[Mod%x] % Mod设Mod=px+q. inv[x]=rpx+q = 0 (mod Mod)pxr+qr = 0 (mod Mod)p + qr = 0 (mod Mod)r=-p/q= -p*inv[q]= -(Mod/x)*i...
分类:
其他好文 时间:
2015-07-20 18:19:52
阅读次数:
90
1、概述 过去,程序员通常以像素为单位设计计算机用户界面。例如:图片大小为80×32像素。这样处理的问题在于,如果在一个每英寸点数(dpi)更高的新显示器上运行该程序,则用户界面会显得很小。在有些情况下,用户界面可能会小到难以看清内容。由此我们采用与分辨率无关的度量单位来开发程序就能够解决这个问题。...
分类:
移动开发 时间:
2015-07-19 20:05:08
阅读次数:
142
一个简单的侧边栏导航组件。/** * Created by Px.T on 6/22/15. */(function($) { 'use strict'; $.fn.navBar = function(options) { var defaults = { menuData:...
分类:
Web程序 时间:
2015-07-19 19:56:34
阅读次数:
162
1、px:对应屏幕上的实际像素点 2、in:屏幕物理长度单位 3、mm:屏幕物理长度单位 4、pt:屏幕物理长度单位,1/72英寸 5、dp(与密度无关的像素):逻辑长度单位,在160dpi屏幕上,1dp=1px=1/160英寸。随着密度变化,对应的像素数量也变化,但并没有直接的变化比例...
分类:
移动开发 时间:
2015-07-18 15:31:36
阅读次数:
156
//模拟实现boost库下的scoped_array
#include
#include
using namespace std;
template
class scoped_array
{
private:
T * px;
scoped_array(scoped_array const &);
scoped_array& operator=(scoped_array const...
分类:
编程语言 时间:
2015-07-17 16:16:08
阅读次数:
118
//模拟实现boost下的scoped_ptr
#include
#include
using namespace std;
template
class scoped_ptr
{
private:
T * px;
scoped_ptr(scoped_ptr const &);
scoped_ptr& operator=(scoped_ptr const &);
void ...
分类:
编程语言 时间:
2015-07-17 12:01:02
阅读次数:
157
转载自http://www.cnblogs.com/xilinch/p/4444833.html 最近在看了许多关于dp-px,px-dp,sp-px,px-sp之间转化的博文,过去我比较常用的方式是: 1 //转换dip为px 2 public static int convertDipOrPx....
分类:
移动开发 时间:
2015-07-16 13:42:06
阅读次数:
137