Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
跨终端产品实践
Search
d2forum
December 02, 2013
1.9k
12
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
跨终端产品实践
我的淘宝实践总结
d2forum
December 02, 2013
More Decks by d2forum
See All by d2forum
TMS的PHP特性
d2forum
0
1.6k
Leap Motion体感实战
d2forum
0
1.3k
Touching Future—s01-e01
d2forum
2
920
KissyCake
d2forum
3
800
贡献标准.s01.e02
d2forum
3
1.3k
一淘响应式设计实践
d2forum
10
1k
响应式web设计与实现介绍
d2forum
8
840
定制版设计开发vs响应式设计开发
d2forum
0
200
定制版设计开发vs响应式设计开发之性能及流量
d2forum
2
450
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.2k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
780
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
140
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
860
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
AI: The stuff that nobody shows you
jnunemaker
PRO
8
720
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
460
Mind Mapping
helmedeiros
PRO
1
250
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Transcript
跨终端产品实践 我的淘宝实践总结 灵玉 - F2E@Taobao 2013/10/19 13年12月1⽇日星期⽇日
•确定实施方案 •响应式技术实践 •pad兼容与优化 •我的淘宝NEXT 13年12月1⽇日星期⽇日
•确定实施方案 • 响应式技术实践 • pad兼容与优化 • 我的淘宝NEXT 13年12月1⽇日星期⽇日
Tablets Desktops phones NEXT 响应式适配 定制化 FIRST 设备支持 PC to
Mobile 13年12月1⽇日星期⽇日
• IE6 • IE7/IE8 • IE9+/Chrome/Sofari/Firefox 浏览器支持 w1024 w1190 Fluid-width
Javascript media query 13年12月1⽇日星期⽇日
• 确定实施方案 •响应式技术实践 • pad兼容与优化 • 我的淘宝NEXT 13年12月1⽇日星期⽇日
Fluid Grid System 流体栅格 13年12月1⽇日星期⽇日
( 4% + 1% ) x 20 = 100% width
= 1190px 13年12月1⽇日星期⽇日
( 4% + 1% ) x 20 = 100% width
= 760px 13年12月1⽇日星期⽇日
视觉规范 遵循流体栅格 13年12月1⽇日星期⽇日
.mt-userinfo { @include column(21); } .mt-app { width: grid-width(6) +
grid-margin(6); } /* .mt-userinfo { width: 4% x 21; margin: 0 0.5%; display: inline; oat: left; } */ /* .mt-app { width: 4% x 6 + 1% x 6; } */ 13年12月1⽇日星期⽇日
http://chesihui.github.io/mt/ 13年12月1⽇日星期⽇日
宽屏 窄屏 ipad横版 ipad竖版 13年12月1⽇日星期⽇日
Responsive Images 响应式图片 13年12月1⽇日星期⽇日
水平垂直剧中 + 等比缩放 13年12月1⽇日星期⽇日
.img-ratio-wide { padding-bottom: 100%; } img { position: absolute; left:0;
top:0; bottom: 0; right:0; max-width: 100%; } <div class="item"> <span class="img-ratio-wide"> <span class="ie7-vertical-center" > <a><img src= ""/></a> </span> </span> </div> To IE7 13年12月1⽇日星期⽇日
img { position: absolute; left:0; top:0; bottom: 0; right:0; max-width:
100%; } <div class="item"> <span class="img-ratio-wide"> <span class="ie7-vertical-center" > <a><img src= ""/></a> </span> </span> </div> .img-ratio-wide { padding-bottom: 100%; } width : height = 1 : 1 13年12月1⽇日星期⽇日
圆形图片 + 等比缩放 13年12月1⽇日星期⽇日
img { border-radius: 50% ; } <img src= " http://img01.taobaocdn.com/T2bNGSXi0aXXXXXXXX_!!
754787757.jpg_120x120xz.jpg" /> 保证正圆 13年12月1⽇日星期⽇日
保证清晰 + 等比缩小 13年12月1⽇日星期⽇日
原尺⼨寸:(3x3)px 重新绘制: (2x2)px 13年12月1⽇日星期⽇日
300x300px 299x299px 避免尺寸微调导致模糊 13年12月1⽇日星期⽇日
background-image: url('image.png'); background-image: -webkit-image-set(url('image.png') 1x, url('image-larger.png') 2x); Retina + 背景图片
13年12月1⽇日星期⽇日
<img src = 'image.png' srcset = 'image-s.png 1x, image-b.png 2x'
/> Retina + 图片元素 http://responsiveimages.org 13年12月1⽇日星期⽇日
Lazy-load images <img class="lazy-load" srcset="image-1x.jpg 1x, image-2x.jpg 2x" /> 13年12月1⽇日星期⽇日
Icons - Font @font-face { font-family: 'mticonfont'; src: url('iconfont.eot'); /*
IE9*/ src: url('iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('iconfont.woff') format('woff'), /* chrome、firefox */ url('iconfont/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */ } 13年12月1⽇日星期⽇日
• 确定实施方案 •pad兼容与优化 • 响应式技术实践 • 我的淘宝NEXT 13年12月1⽇日星期⽇日
善用特性 + 交互体验 13年12月1⽇日星期⽇日
css 3D css 2D JS Animation 动画选用 + 更加流畅 translateXY/left/top
left/top/margin translateXYZ faster 13年12月1⽇日星期⽇日
css3 Animation JS Animation 动画选用 + 更加流畅 height/width faster height/width
13年12月1⽇日星期⽇日
css3 Animation css3 Animation 动画选用 + 更加流畅 left / top
/ margin faster translateXY 13年12月1⽇日星期⽇日
Math.round() -webkit-transform: translate3d(246.7px, 0px, 0px) 动画选用 + 更加流畅 -webkit-transform: translate3d(247px,
0px, 0px) 13年12月1⽇日星期⽇日
css3 rem + 字体设置 html { font-size: 62.5%; /*10 ÷
16 × 100% = 62.5%*/ } h1 { font-size: 1.4rem; /*1.4 × 10px = 14px */ } h2 { font-size: 2.4rem; /*2.4 × 10px = 24px*/ } 13年12月1⽇日星期⽇日
Touch Mouse + 事件顺序 touchstart touchend 等待375ms mousemove mousedown mouseup
click touchmove scroll ... 13年12月1⽇日星期⽇日
•我的淘宝NEXT • 响应式技术实践 • pad兼容与优化 • 确定实施方案 13年12月1⽇日星期⽇日
• 数据与模板分离 • 框架定制化、模块颗粒公用化 • 响应式技术应用 • 足够轻量 • 性能强优化
13年12月1⽇日星期⽇日
THX 13年12月1⽇日星期⽇日