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
[re] taobao-cross-device-development
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
hbrls
October 19, 2013
Technology
80
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
[re] taobao-cross-device-development
hbrls
October 19, 2013
More Decks by hbrls
See All by hbrls
[re] renren.com oauth implementation
hbrls
1
100
the meta-analysis method
hbrls
1
71
what do sns users want
hbrls
0
120
Other Decks in Technology
See All in Technology
AI Driven AI Governance
pict3
0
160
Compose 新機能総まとめ / What's New in Jetpack Compose
yanzm
0
140
小さいから、全部わかる。— 常駐AI "xangi" のすすめ
sugupoko
0
270
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
オブザーバビリティ、本当に活用できてる? 〜API連携×生成AIで成熟度を自動評価〜
dmmsre
0
1.5k
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
8.3k
AWS Blocks を触ってみた/first-tach-aws-blocks
fossamagna
2
150
CIで使うClaude
iwatatomoya
0
140
AI時代における最適なQA組織の作り方
ymty
3
430
人を動かすのは時間ではなく、納得感 〜新任EMが入社3ヶ月、組織を2回変えた話〜
kakehashi
PRO
2
130
20260702_生成AIはどこまで成長するのか_チャットだけじゃない世界
doradora09
PRO
0
110
事業価値を⽣み出すSREへ SREが担うべき意思決定の5層
kenta_hi
1
1.4k
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Un-Boring Meetings
codingconduct
0
330
Art, The Web, and Tiny UX
lynnandtonic
304
22k
The World Runs on Bad Software
bkeepers
PRO
72
12k
GitHub's CSS Performance
jonrohan
1033
470k
Google's AI Overviews - The New Search
badams
0
1.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
230
Embracing the Ebb and Flow
colly
88
5.1k
Music & Morning Musume
bryan
47
7.3k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
250
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
440
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⽇日星期⽇日