Git Product home page Git Product logo

media_demo's Introduction

控制台:document.documentElement.clientWidth = 物理像素 / 缩放比例

使用 viewport meta 标签在手机浏览器上控制布局: device-width:设备宽度 initial-scale:初始的缩放 maximum-scale:最大的值的缩放

隐藏苹果浏览器的工具栏和菜单栏。 全屏显示 :

设置Web App的状态栏(屏幕顶部栏)的样式 :

实际浏览器的布局宽度: (1) 如果没有设置viewport width=device-width; 此时布局宽度就是980px;(浏览器统一缩放的);

(2) 如果设置了,布局宽度就是 ,设备的物理像素/window.devicePixelRatio 。 直接通过chrome 手机浏览器工具查实际浏览器布局宽度

@media screen and (orientation:landscape)横屏

@media screen and (orientation:portrait)竖屏

@media only screen and (max-width:320px ) 只适合于浏览器

@media all and (min-width:1024px)适用于所有设备包括打印机

media_demo's People

Contributors

1063066968 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.