Apple’s newest devices feature the Retina Display, a screen that packs double as many pixels into the same space as older devices. For designers this immediately brings up the question, “What can I do to make my content look outstanding on these new iPads and iPhones?”. First there are a few tough questions to consider, but then this guide will help you get started making your websites and web apps look amazingly sharp with Retina images!
Things to Consider When Adding Retina Images
The main issue with adding retina images is that the images are double as large and will take up extra bandwidth (this won’t be an issue for actual iOS apps, but this guide is covering web sites & web apps only). If your site is mostly used on-the-go over a 3G network it may not be wise to make all your graphics high-definition, but maybe choose only a select few important images. If you’re creating something that will be used more often on a WI-FI connection or have an application that is deserving of the extra wait for hi-res graphics these steps below will help you target only hi-res capable devices.
Simple Retina Images
The basic concept of a Retina image is that your taking a larger image, with double the amount of pixels that your image will be displayed at (e.g 200 x 200 pixels), and setting the image to fill half of that space (100 x 100 pixels). This can be done manually by setting the height and width in HTML to half the size of your image file.
<img src="my200x200image.jpg" width="100" height="100">
If you’d like to do something more advanced keep reading below for how you can apply this technique using scripting.
Creating Retina Icons for Your Website
When users add your website or web app to their homescreen it will be represented by an icon. These sizes for regular and Retina icons (from Apple) are as follows:
iPhone | 57 x 57 |
---|---|
Retina iPhone | 114 x 114 |
iPad | 72 x 72 |
Retina iPad | 144 x 144 |
For each of these images you create you can link them in the head of your document like this (if you want the device to add the round corners remove -precomposed):
<link href="touch-icon-iphone.png" rel="apple-touch-icon-precomposed" />
<link href="touch-icon-ipad.png" rel="apple-touch-icon-precomposed" sizes="72x72" />
<link href="touch-icon-iphone4.png" rel="apple-touch-icon-precomposed" sizes="114x114" />
<link href="touch-icon-ipad3.png" rel="apple-touch-icon-precomposed" sizes="144x144" />
If the correct size isn’t specified the device will use the smallest icon that is larger than the recommended size (i.e. if you left out the 114px the iPhone 4 would use the 144px icon).
Retina Background Images
Background images that are specified in your CSS can be swapped out using media queries. You’ll first want to generate two versions of each image. For example ‘bgPattern.png’ at 100px x 100px and ‘bgPattern@2x.png’ at 200px x 200px. It will be useful to have a standard naming convention such as adding @2x for these retina images. To add the new @2x image to your site simply add in the media query below (You can add any additional styles that have background images within the braces of the same media query):
.repeatingPattern {
background: url(../images/bgPattern.png) repeat;
background-size: 100px 100px;
}
@media only screen and (-webkit-min-device-pixel-ratio: 2) {
.repeatingPattern {
background: url(../images/bgPattern@2x.png) repeat;
}
}
JavaScript for Retina Image Replacement
For your retina images that aren’t backgrounds the best option seems to be either creating graphics with CSS, using SVG, or replacing your images with JavaScript. Just like the background images, you’ll want to create a normal image and one ‘@2x’ image. Then with JavaScript you can detect if the pixel ratio of the browser is 2x, just like you did with the media query:
if (window.devicePixelRatio == 2) {
//Replace your img src with the new retina image
}
If you’re using jQuery you could quickly replace all your images like this very basic example below. It’s a good idea to add a class to identify the images with hi-res versions so you don’t replace any others by mistake. I’ve added a class=”hires” for this example. Also make sure you have the standard (non-retina) image height and width set in the HTML:
<img class="hires" alt="" src="search.png" width="100" height="100" />
<script type="text/javascript">
$(function () {
if (window.devicePixelRatio == 2) {
var images = $("img.hires");
// loop through the images and make them hi-res
for(var i = 0; i < images.length; i++) {
// create new image name
var imageType = images[i].src.substr(-4);
var imageName = images[i].src.substr(0, images[i].src.length - 4);
imageName += "@2x" + imageType;
//rename image
images[i].src = imageName;
}
}
});
</script>
Server-Side Retina Images
If you’d like to implement a server-side retina image solution, I recommend checking out Jeremy Worboys’ Retina Images (which he also posted in the comments below). His solution uses PHP code to determine which image should be served. The benefit of this solution is that it doesn’t have to replace the small image with the retina one so you’re using less bandwidth, especially if you have lots of images that you’re replacing.
Website Optimization for Retina Displays
If you’re looking for additional information on creating Retina images, I’ve recently had a short book published called Website Optimization for Retina Displays that covers a range of related topics. It contains some of what is above, but also includes samples for many different situations for adding Retina images. It explains the basics of creating Retina images, backgrounds, sprites, and borders. Then it talks about using media queries, creating graphics with CSS, embedding fonts, creating app icons, and more tips for creating Retina websites.
错误提示:无法从其“Visible”属性的字符串表示形式“<%= true %>”创建“System.Boolean”类型的对象。
英文:Cannot create an object of type 'System.Boolean' from its string representation '<%= true %>' for the 'Visible' property.
解决办法:改为
<% if(true) { %> 内容 <% } %>


版本区别
功能特性 | Windows RT | Windows 8 (标准版) |
Windows8 Pro (专业版) |
Windows 8 Enterprise (企业版) |
与现有Windows 兼容 | 无 | 有 | 有 | 有 |
购买渠道 | 在设备上预装 | 大多数渠道 | 大多数渠道 | 经过认证的客户 |
架构 | ARM (32-bit) | IA-32 (32-bit) or x86-64 (64-bit) | IA-32 (32-bit) or x86-64 (64-bit) | IA-32 (32-bit) or x86-64 (64-bit) |
安全启动 | 有 | 有 | 有 | 有 |
图片密码 | 有 | 有 | 有 | 有 |
开始界面、动态磁帖以及相关效果 | 有 | 有 | 有 | 有 |
触摸键盘、拇指键盘 | 有 | 有 | 有 | 有 |
语言包 | 有 | 有 | 有 | 有 |
更新的资源管理器 | 有 | 有 | 有 | 有 |
标准程序 | 有 | 有 | 有 | 有 |
文件历史 | 有 | 有 | 有 | 有 |
系统的重置功能 | 有 | 有 | 有 | 有 |
Play To “播放至”功能 | 有 | 有 | 有 | 有 |
Connected standby保持网络连接的待机 | 有 | 有 | 有 | 有 |
Windows Update | 有 | 有 | 有 | 有 |
Windows Defender | 有 | 有 | 有 | 有 |
增强的多显示屏支持 | 有 | 有 | 有 | 有 |
新的任务管理器 | 有 | 有 | 有 | 有 |
ISO 镜像 and VHD 挂载 | 有 | 有 | 有 | 有 |
移动通信功能 | 有 | 有 | 有 | 有 |
Microsoft 账户 | 有 | 有 | 有 | 有 |
Internet Explorer 10 | 有 | 有 | 有 | 有 |
SmartScreen | 有 | 有 | 有 | 有 |
Windows 商店 | 有 | 有 | 有 | 有 |
Xbox Live 程序 (包括 Xbox Live Arcade) | 有 | 有 | 有 | 有 |
Exchange ActiveSync | 有 | 有 | 有 | 有 |
快速睡眠(snap) | 有 | 有 | 有 | 有 |
VPN连接 | 有 | 有 | 有 | 有 |
Device encryption | 有 | 无 | 无 | 无 |
随系统预装的Microsoft Office | 有 | 无 | 无 | 无 |
桌面 | 部分 | 有 | 有 | 有 |
储存空间管理(storage space) | 无 | 有 | 有 | 有 |
Windows Media Player | 无 | 有 | 有 | 有 |
Windows Media Center | 无 | 无 | 需另行添加 | 无 |
远程桌面 | 只作客户端 | 只作客户端 | 客户端和服务端 | 客户端和服务端 |
从VHD启动 | 无 | 无 | 有 | 有 |
BitLocker and BitLocker To Go | 无 | 无 | 有 | 有 |
文件系统加密 | 无 | 无 | 有 | 有 |
加入Windows 域 | 无 | 无 | 有 | 有 |
组策略 | 无 | 无 | 有 | 有 |
AppLocker | 无 | 无 | 有 | 有 |
Hyper-V | 无 | 无 | 仅64bit支持 | |
Windows To Go | 无 | 无 | 无 | 有 |
DirectAccess | 无 | 无 | 无 | 有 |
分支缓存(BranchCache) | 无 | 无 | 无 | 有 |
以RemoteFX提供视觉特效 | 无 | 无 | 无 | 有 |
Metro风格程序的部署 | 无 | 无 | 无 | 有 |
下载地址
根据下面的 SHA1 或文件名在网上搜索下载地址,下载完成后验证其 SHA1 即可。
Windows 8 (x86) - DVD (Chinese-Simplified)
文件名: cn_windows_8_x86_dvd_915414.iso
SHA1: 0C4A168E37E38EFB59E8844353B2535017CBC587
Windows 8 (x64) - DVD (Chinese-Simplified)
文件名: cn_windows_8_x64_dvd_915407.iso
SHA1: A87C4AA85D55CD83BAE9160560D1CB3319DD675C
Windows 8 Pro VL (x86) - DVD (Chinese-Simplified)
文件名: cn_windows_8_pro_vl_x86_dvd_917720.iso
SHA1: EEEF3C3F6F05115C7F7C9C1D19D6A6A6418B5059
Windows 8 Pro VL (x64) - DVD (Chinese-Simplified) 推荐
文件名: cn_windows_8_pro_vl_x64_dvd_917773.iso
SHA1: 9C4EC9FC4FB561F841E22256BC9DEA6D9D6611FF
Windows 8 Enterprise (x86) - DVD (Chinese-Simplified)
文件名: cn_windows_8_enterprise_x86_dvd_917682.iso
SHA1: 951565D8579C5912FB4A407B3B9F715FBDB77EFE
Windows 8 Enterprise (x64) - DVD (Chinese-Simplified)
文件名: cn_windows_8_enterprise_x64_dvd_917570.iso
SHA1: 1280BC3A38A7001FDE981FA2E465DEB341478667
激活方式
目前流行 KMSmicro 激活,写此文时的最新版本是 4.0,下载地址网上搜之(或联系我)。
简中32位:cn_office_professional_plus_2013_x86_dvd_1134005.iso
SHA1:e1ced98dc92081527c444dfcac2b0ac8606ba80a
简中64位:cn_office_professional_plus_2013_x64_dvd_1134006.iso
SHA1:adb8d9d3095638f25e9df2e708100d64804586a7
推荐 批量授权专业版 Volume license Professional Plus
简中32位:SW_DVD5_Office_Professional_Plus_2013_W32_ChnSimp_MLF_X18-55126.ISO
SHA1:1b15b7e8753d51ecca66e23f6d07377c58c52376
简中64位:SW_DVD5_Office_Professional_Plus_2013_64Bit_ChnSimp_MLF_X18-55285.ISO
SHA1:d20c6f6a24034e2c2b2b21e4403695cdd5a1903d
请根据 SHA1 或文件名在网上搜索下载地址,然后验证其 SHA1 即可。
目前流行 KMSmicro 激活,写此文时的最新版本是 4.0,下载地址网上搜之(或联系我)。
evasi0n 是由 pod2g、planetbeing、pimskeks、肌肉男四名黑客组成的 evad3rs 越狱梦之队发布的 iOS6 完美越狱工具。可以完美越狱 iOS6.0、iOS6.0.1、iOS6.0.2、iOS6.1、iOS6.1.1 和 iOS6.1.2 等多个固件版本的所有 iOS6 设备(AppleTV 除外)。
下载地址:http://evasi0n.com/

Adobe Fireworks CS6
http://trials2.stage.adobe.com/AdobeProducts/FWKS/12/win32/Fireworks_12_LS3.exe
http://trials2.stage.adobe.com/AdobeProducts/FWKS/12/osx10/Fireworks_12_LS3.dmg
Adobe Photoshop CS6 Extended
http://trials2.stage.adobe.com/AdobeProducts/PHSP/13/win32/Photoshop_13_LS3.exe
http://trials2.stage.adobe.com/AdobeProducts/PHSP/13/win32/Photoshop_13_LS3.7z
http://trials2.stage.adobe.com/AdobeProducts/PHSP/13/osx10/Photoshop_13_LS3.dmg
Adobe Dreamweaver CS6
http://trials2.stage.adobe.com/AdobeProducts/DRWV/12/win32/Dreamweaver_12_LS3.exe
http://trials2.stage.adobe.com/AdobeProducts/DRWV/12/osx10/Dreamweaver_12_LS3.dmg
Adobe Flash Professional CS6
http://trials2.stage.adobe.com/AdobeProducts/FLPR/12/win32/FlashPro_12_LS3.exe
http://trials2.stage.adobe.com/AdobeProducts/FLPR/12/osx10/FlashPro_12_LS3.dmg
Adobe Premiere CS6
http://trials2.stage.adobe.com/AdobeProducts/PPRO/6/win32/PremierePro_6_LS7.7z
http://trials2.stage.adobe.com/AdobeProducts/PPRO/6/win32/PremierePro_6_LS7.exe
http://trials2.stage.adobe.com/AdobeProducts/PPRO/6/osx10/PremierePro_6_LS7.dmg
== 安装 ============================================================================
用记事本打开文件:系统盘:\windows\system32\drivers\etc\hosts,往底部添加内容:
127.0.0.1 activate.adobe.com
127.0.0.1 practivate.adobe.com
127.0.0.1 ereg.adobe.com
127.0.0.1 activate.wip3.adobe.com
127.0.0.1 wip3.adobe.com
127.0.0.1 3dns-3.adobe.com
127.0.0.1 3dns-2.adobe.com
127.0.0.1 adobe-dns.adobe.com
127.0.0.1 adobe-dns-2.adobe.com
127.0.0.1 adobe-dns-3.adobe.com
127.0.0.1 ereg.wip3.adobe.com
127.0.0.1 activate-sea.adobe.com
127.0.0.1 wwis-dubc1-vip60.adobe.com
127.0.0.1 activate-sjc0.adobe.com
== 破解 ============================================================================
先用“试用”的方式安装官方原版 CS6 产品
把 amtlib.dll 文件覆盖至相应的安装目录即可,注意区分 32 位和 64 位。
覆盖前最好先备份原 amtlib.dll 文件。
经证实,此补丁适用于
Photoshop CS6 32/64
Fireworks CS6
Dreamweaver CS6
……
只要原 amtlib.dll 文件的以下属性相同即适用:
大小: 1793672 字节
文件版本: 6.0.0.75
MD5: 1B39972F4D62E03979D07C79486DE9D8
SHA1: 9889C85F936CEA1CFE5ABC7E0D1C2D3E7E3A656A
CRC32: 6140E48B
另外,Flash CS6 的 amtlib.dll 文件版本为 6.0.0.93
但替换后也能正常破解,尚未探究是否对日常工作产生影响
离 VS2008 发布已经过去多年了,最近有个项目必须用到,我觉得还是有必要把它的一些信息写下来,特别是下载和注册方式,方便日后查看。我关心的当然是 Team Suite 版本。
zh-hans_visual_studio_team_system_2008_team_suite_trial_x86_dvd_x14-29243.iso 是 90 天试用版 (需要序列号,网上有很多)
这里推荐 MSDN 版(无需序列号,没有使用期限):
Visual Studio Team System 2008 Team Suite (x86) - DVD (Chinese-Simplified)
文件名:zh-hans_visual_studio_team_system_2008_team_suite_x86_dvd_x14-26452.isoSHA1:12d905fb0c6fd02b33cceaad1e5905929f413c0a
有了用这个 SHA1 去网上搜一下,就可以看到一大堆下载地址,譬如:
ed2k://|file|zh-Hans_visual_studio_team_system_2008_team_suite_x86_dvd_X14-26452.iso|4663904256|8E2D6430D819328940B9BF83568589FA|/
SP1 补丁包:
Visual Studio 2008 Service Pack 1 (x86, x64 WoW) - DVD (Chinese-Simplified)
文件名:zh-hans_visual_studio_2008_service_pack_1_x86_dvd_x15-12981.iso
SHA1:8C3EA92CBC60CECB30B6262DB475BDE1E2620B36
ed2k://|file|zh-hans_visual_studio_2008_service_pack_1_x86_dvd_x15-12981.iso|941703168|E1647161AA5CA4567B787A5606D2A065|/
离 VS2012 发布已经过去一年了,我觉得还是有必要把它的一些信息写下来,特别是下载和注册方式,方便日后查看。我关心的依旧是 Ultimate 版本。
VS2012_ULT_chs.iso 是 Windows 下载中心的 Trial 版 (需要序列号,网上有很多)
这里推荐 MSDN 版(无需序列号,没有使用期限):
Visual Studio Ultimate 2012 (x86) - DVD (Chinese-Simplified)
文件名:cn_visual_studio_ultimate_2012_x86_dvd_920954.isoSHA1:C01EEF4C6B10F654257748197F3A8E50B2BFD58B
有了用这个 SHA1 去网上搜一下,就可以看到一大堆下载地址,譬如:
ed2k://|file|cn_visual_studio_ultimate_2012_x86_dvd_920954.iso|1643802624|A3058CE4F2AD7035DB6E67586D07AAA5|/
最近开发了一款 iPhone 客户端应用,提交到 App Store,被拒绝(Rejected)。然后修复问题后再次提交,仍然被拒绝,奇怪的是 Resolution Center 中的拒绝原因跟上次一模一样。
幸好我在应用中做了记录客户端信息的功能,查看后发现,IP 来自“美国Apple公司”的启动版本竟然是第一次提交的版本。于是我登录 iTunes Connect 跟苹果客服联系,对方回复他们打开的确实是有问题那个版本。
正当迷茫之时,无意中在 iTunes Connect 看到 Binary Details 这个按钮,点进去一看明白了。原来,虽然我在 Xcode 中重新上传了源文件,但是这里看到的仍然是旧版本。于是我点右上角的“Reject This Binary”按钮,重新通过 Xcode 上传源代码,过会儿再进入 Binary Details 查看,还是没有变化。苦恼中。
是不是 Xcode 中要做什么处理呢?我是新手,只知道点菜单栏上的三角形按钮是调试,具体要怎么使用 Debug / Release / Run / Test / Profile / Analyze / Archive 还真是不太明白,于是对这些功能一阵乱点,意外发现 Organizer 的 Archives 中项目的 Creation Data 变成了刚才的时间,而且下面也多了一条记录,赶紧 Distribute!
一柱香后再回头去看看 Binary Details,终于看到新版本的信息了。
Waiting For Review 中……
