昨天在学习用 {zh:栅格设计|栅格系统} 进行网页排版。
里面提到了适合1024宽度屏幕时,一般采用960px作为网页的宽度。
请到网页栅格系统研究(1):960的秘密看原因。
我下面这段程序就是为了证明为什么960是比较合适的。
Python语言: 为何1024*768分辨率下网页的宽度为960px
#!/usr/bin/python # -*- coding: utf-8 -*-
#此代码证明使用栅格系统设计网页时, 为何1024分辨率最佳网页宽度是960px MaxWidth = 1024 group = {} #总宽度 for width in range(2, MaxWidth): count = 0 #栅格宽度 for gridWidth in range(2, MaxWidth): #如果可以有整数个栅格 if width % gridWidth == 0: count = count + 1
if group.has_key(count): [...]
-
无限空间的Smugmug相册
注册快速, 强大, 无限流量, 收费的Smugmug相册时别忘记输入优惠码: VczUYd6cAcQnI
能为你优惠5美元, 同时提供14天试用, 信用卡支付 Smugmug的首页地址是http://www.smugmug.com
我已经是第三年续费了 点此查看我和Smugmug的故事 -
Feeds
-
This is me
-
Categories
-
Recent Comments
-
Douban
-
Blogroll
-
Tags
2008 2009 adsense air alarm amazon apache app application blog bluehost compare decoration dog domain e70 eclipse Firefox food ftp Google google talk health home house life Linux Microsoft mobile msdn net network nokia pet php sanya shanghai skype symbian travel twitter ubuntu update windows Wordpress -
Others

