search
HomeWeb Front-endH5 Tutorial苹果官网是怎么做到完美保证多平台浏览体验的?

回复内容:

首页的宽度随着浏览器自适应,最小 1024px ,最大 1440px 。高度最小 830px ,最大 1472px 。

背景图片固定 1440px 宽, left 从 50% 开始,但是因为 margin-left 是 -720px ,这就实现了居中。背景图就那么大,居中显示,小了就把两边切掉一些,但因为浮动范围也不是很大所以切掉得也不多。

导航栏保证居中,窗口太宽了两边就空白,但是因为其他页面元素也限制在 1440px 范围内,所以不显得违和。

下面的四个图片每个是个
  • ,宽度自动 25% 。

    导航栏和页脚的文本是真的文本,其他的都是图片,所以在任何设备商显示效果都一样。

    页脚位置 absolute ,左、下、右都设成0,所以能贴在底下。但是因为 body 有最大高度限制,页脚也不是可以无限制地下降。

    上面大致说了苹果官网怎么做到多平台显示效果一样,下面讨论一下原文体中的“完美保证多平台浏览体验”。

    在 Retina 屏幕上,图片自动加载成4倍分辨率的版本。就比如说左下角那个 iPhone 5s 的广告,普通屏幕上加载的是这个图片:
    苹果官网是怎么做到完美保证多平台浏览体验的?
    但是在 Retina 屏幕上加载的是这个(知乎上可能自动把图片缩小了点,但是宽高应该是上图的2倍):
    苹果官网是怎么做到完美保证多平台浏览体验的?
    其他图片(包括大背景图)也都是有两个版本,如果是 Retina 设备就自动加载分辨率高的,但是 HTML 里面的宽高不变,所以页面布局不受影响。这背后的技术可以参考这篇文章: blog.cloudfour.com/how-

    最后我想说,苹果官网并没有保证在自家 iPhone 上的体验最佳。这个网站在 iPhone 上面看,有些文本和链接都太小,必须局部放大才能看得比较舒服,再加上有些子页面中有支持手势的页面元素(比如一个画廊左右滑动可以查看前后的图片),这又会导致跟缩放和移动当前页面区域的操作冲突。我不认为这样的体验算得上“完美”。很多网站都专门为移动设备做了一个单独的优化版本,但苹果却没有表率为自家移动设备优化体验,这点确实想不通。 右键审查元素看下不完了么,文字都是图片。不同分辨率的设备加载的图片不一样而已。 我觉得在iPhone上的字就是败笔啊。一直不理解蚂蚁一样大的字为何会出现在Apple主页上。每次都要经过放大才可以切换标签。
  • Statement
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Understanding H5 Code: The Fundamentals of HTML5Understanding H5 Code: The Fundamentals of HTML5Apr 17, 2025 am 12:08 AM

    HTML5 is a key technology for building modern web pages, providing many new elements and features. 1. HTML5 introduces semantic elements such as, , etc., which enhances web page structure and SEO. 2. Support multimedia elements and embed media without plug-ins. 3. Forms enhance new input types and verification properties, simplifying the verification process. 4. Offer offline and local storage functions to improve web page performance and user experience.

    H5 Code: Best Practices for Web DevelopersH5 Code: Best Practices for Web DevelopersApr 16, 2025 am 12:14 AM

    Best practices for H5 code include: 1. Use correct DOCTYPE declarations and character encoding; 2. Use semantic tags; 3. Reduce HTTP requests; 4. Use asynchronous loading; 5. Optimize images. These practices can improve the efficiency, maintainability and user experience of web pages.

    H5: The Evolution of Web Standards and TechnologiesH5: The Evolution of Web Standards and TechnologiesApr 15, 2025 am 12:12 AM

    Web standards and technologies have evolved from HTML4, CSS2 and simple JavaScript to date and have undergone significant developments. 1) HTML5 introduces APIs such as Canvas and WebStorage, which enhances the complexity and interactivity of web applications. 2) CSS3 adds animation and transition functions to make the page more effective. 3) JavaScript improves development efficiency and code readability through modern syntax of Node.js and ES6, such as arrow functions and classes. These changes have promoted the development of performance optimization and best practices of web applications.

    Is H5 a Shorthand for HTML5? Exploring the DetailsIs H5 a Shorthand for HTML5? Exploring the DetailsApr 14, 2025 am 12:05 AM

    H5 is not just the abbreviation of HTML5, it represents a wider modern web development technology ecosystem: 1. H5 includes HTML5, CSS3, JavaScript and related APIs and technologies; 2. It provides a richer, interactive and smooth user experience, and can run seamlessly on multiple devices; 3. Using the H5 technology stack, you can create responsive web pages and complex interactive functions.

    H5 and HTML5: Commonly Used Terms in Web DevelopmentH5 and HTML5: Commonly Used Terms in Web DevelopmentApr 13, 2025 am 12:01 AM

    H5 and HTML5 refer to the same thing, namely HTML5. HTML5 is the fifth version of HTML, bringing new features such as semantic tags, multimedia support, canvas and graphics, offline storage and local storage, improving the expressiveness and interactivity of web pages.

    What Does H5 Refer To? Exploring the ContextWhat Does H5 Refer To? Exploring the ContextApr 12, 2025 am 12:03 AM

    H5referstoHTML5,apivotaltechnologyinwebdevelopment.1)HTML5introducesnewelementsandAPIsforrich,dynamicwebapplications.2)Itsupportsmultimediawithoutplugins,enhancinguserexperienceacrossdevices.3)SemanticelementsimprovecontentstructureandSEO.4)H5'srespo

    H5: Tools, Frameworks, and Best PracticesH5: Tools, Frameworks, and Best PracticesApr 11, 2025 am 12:11 AM

    The tools and frameworks that need to be mastered in H5 development include Vue.js, React and Webpack. 1.Vue.js is suitable for building user interfaces and supports component development. 2.React optimizes page rendering through virtual DOM, suitable for complex applications. 3.Webpack is used for module packaging and optimize resource loading.

    The Legacy of HTML5: Understanding H5 in the PresentThe Legacy of HTML5: Understanding H5 in the PresentApr 10, 2025 am 09:28 AM

    HTML5hassignificantlytransformedwebdevelopmentbyintroducingsemanticelements,enhancingmultimediasupport,andimprovingperformance.1)ItmadewebsitesmoreaccessibleandSEO-friendlywithsemanticelementslike,,and.2)HTML5introducednativeandtags,eliminatingthenee

    See all articles

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    AI Hentai Generator

    AI Hentai Generator

    Generate AI Hentai for free.

    Hot Article

    R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
    1 months agoBy尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. Best Graphic Settings
    1 months agoBy尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. How to Fix Audio if You Can't Hear Anyone
    1 months agoBy尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. Chat Commands and How to Use Them
    1 months agoBy尊渡假赌尊渡假赌尊渡假赌

    Hot Tools

    EditPlus Chinese cracked version

    EditPlus Chinese cracked version

    Small size, syntax highlighting, does not support code prompt function

    mPDF

    mPDF

    mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment

    Dreamweaver Mac version

    Dreamweaver Mac version

    Visual web development tools