上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 23 下一页
摘要: 1、Smartphones (竖板和横板)@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { /* 你的样式写在这里 */ }2、Smartphones (横板)@media on... 阅读全文
posted @ 2015-09-28 08:34 Coca-code 阅读(197) 评论(0) 推荐(0)
摘要: @charset "utf-8";/** * iPhone 4/4s landscape & portrait */@media only screenand (min-device-width: 320px)and (max-device-width: 480px)and (-webkit-dev... 阅读全文
posted @ 2015-09-18 10:49 Coca-code 阅读(175) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2015-09-13 18:35 Coca-code 阅读(136) 评论(0) 推荐(0)
摘要: //加法 function FloatAdd(arg1,arg2){ var r1,r2,m; try{r1=arg1.toString().split(".")[1].length}catch(e){r1=0} try{r2=arg2.toSt... 阅读全文
posted @ 2015-08-26 15:28 Coca-code 阅读(194) 评论(0) 推荐(0)
摘要: var SingletonTester = (function () { //参数:传递给单例的一个参数集合 function Singleton(args) { //设置args变量为接收的参数或者为空(如果没有提供的话) var args = args |... 阅读全文
posted @ 2015-08-18 15:09 Coca-code 阅读(164) 评论(0) 推荐(0)
摘要: 1.方法借用,就是“继承”,一个类中的原型方法在另一个类中使用。 p227 generic对象2.私有状态:“将变量闭包在一个匿名函数内来模拟私有变量” ,这些“变量”只能被类的实例方法访问;3.construct重构:4. 工厂方法5. 子类:“方法链”,“构造函数链”,“组合”6. 阅读全文
posted @ 2015-08-11 10:03 Coca-code 阅读(152) 评论(0) 推荐(0)
摘要: // 设置开始页面图片 // 在设置书签的时候可以显示好看的图标 // 肖像模式样式<link rel="stylesheet" media="all and (orientation:landscape)"href="landscape.css" // 风景模式样式//竖屏时使用的样式... 阅读全文
posted @ 2015-08-06 12:00 Coca-code 阅读(118) 评论(0) 推荐(0)
摘要: // 防止内容区域滚到底后引起页面整体的滚动var content = document.querySelector('main');var startY;content.addEventListener('touchstart', function (e) { startY = e.touc... 阅读全文
posted @ 2015-08-06 11:31 Coca-code 阅读(156) 评论(0) 推荐(0)
摘要: .border-image-1px { border-width: 1px 0px; -webkit-border-image: url("border.png") 2 0 stretch; border-image: url("border.png") 2 0 stretch;} 阅读全文
posted @ 2015-08-06 10:53 Coca-code 阅读(133) 评论(0) 推荐(0)
摘要: 手机浏览器对header有时用position:fixed;没用,只能用position:absolute;代替,鉴于此,封装了如下代码用于适配和过滤:function isSupportFixed() { var userAgent = window.navigator.userAgent,... 阅读全文
posted @ 2015-08-06 10:44 Coca-code 阅读(165) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 23 下一页