开发问题集
2014-12-10 19:46
190 查看
1.疑问拿到一个640*1136的设计图,开发中怎么高度还原?
在chrome中f12手机模式,选中iphone5,是320*568的,而实际上iphone5的高大上Retina屏是640*1136的分辨率,Retina屏和普屏分辨率恰好是两倍。在开发中,我们按320*568开发即可,拿到设计稿,扔进ps里,把量到的长宽除以2就是啦。
更多阅读:
http://www.zhihu.com/question/20583941?group_id=114817350
http://www.cnblogs.com/BigPolarBear/archive/2012/03/26/2417777.html
2.透明背景,内容文字不透明
background: rgba(255,255,255,.7); //正道!
//background: #fff;
//opacity: 0.7;
rgba中的alpha和opacity区别是什么?没错,就是不会对子元素产生影响
更多阅读:
http://kayosite.com/css3-rgba-color.html
3.新生成的元素动态绑定
错误示范:
$(document).ready(function() {
$(".add").click(function() {
$(this).addClass('cancel');
$(this).removeClass('add');
});
$(".cancel").click(function() {//后来才生成的.cancel,这样是木有反应的。。。
$(this).removeClass('cancel');
$(this).addClass('add');
});
});
人间正道:
$(document).ready(function() {
$(document).on("click", ".add", function() {
// code here
});
$(document).on("click", ".cancel", function() {
// code here
});
});
在chrome中f12手机模式,选中iphone5,是320*568的,而实际上iphone5的高大上Retina屏是640*1136的分辨率,Retina屏和普屏分辨率恰好是两倍。在开发中,我们按320*568开发即可,拿到设计稿,扔进ps里,把量到的长宽除以2就是啦。
更多阅读:
http://www.zhihu.com/question/20583941?group_id=114817350
http://www.cnblogs.com/BigPolarBear/archive/2012/03/26/2417777.html
2.透明背景,内容文字不透明
background: rgba(255,255,255,.7); //正道!
//background: #fff;
//opacity: 0.7;
rgba中的alpha和opacity区别是什么?没错,就是不会对子元素产生影响
更多阅读:
http://kayosite.com/css3-rgba-color.html
3.新生成的元素动态绑定
错误示范:
$(document).ready(function() {
$(".add").click(function() {
$(this).addClass('cancel');
$(this).removeClass('add');
});
$(".cancel").click(function() {//后来才生成的.cancel,这样是木有反应的。。。
$(this).removeClass('cancel');
$(this).addClass('add');
});
});
人间正道:
$(document).ready(function() {
$(document).on("click", ".add", function() {
// code here
});
$(document).on("click", ".cancel", function() {
// code here
});
});
相关文章推荐
- BS开发技巧之三: 处理中文文件名附件存到本地时缺省出现乱码问题
- 在JAVA开发中的中文处理问题及解决办法
- 利用.Text提供的Web服务接口进行开发出现的问题。
- 开发wap网站,还是碰到不少问题
- (转载)使用ActiveX控件开发网页常见的问题
- ASP开发中关于RecordCount只返回-1的问题解接方式!
- 重新搭建"灶具维修管理系统"的VB开发环境遇到的几个问题
- 关于在ORACLE下开发JAVA的几个问题
- 使用ActiveX控件开发网页常见的问题
- 旧话重提,ASP开发中数据库地址暴露的问题!因昨天发现google暴露数据库地址的问题想到的!
- 一名Delphi程序员的开发习惯(非技术问题)
- WebService在开发中的实际问题
- 一个sharpdevelop和vs.net协同开发的问题
- 游戏开发中的常见问题:并发
- solaris上开发J2EE应用中文问题的解决
- moto手机开发的一些问题汇总(一)
- 关于水晶报表二次开发的几个问题
- 利用.Text提供的Web服务接口进行开发出现的问题。
- (转载)使用ActiveX控件开发网页常见的问题
- 利用netBeans开发JSP+javaBeans总是出错问题的解决