Why won't the Android browser span this paragraph over the full browser width?

后端 未结 8 2006
无人及你
无人及你 2020-12-24 13:26

The Problem:

\"enter


The Question

The paragraph will fill th

8条回答
  •  离开以前
    2020-12-24 13:48

    For android and small screens on default navigator, the paragraph is taken the device-width as p->max-width.

    In my case I've solved with viewport and some javascript:

    //NOTE: Take android boolean var from user-agent in request
    var screenWidth=window.screen.width;
    if (screenWidth<600 && android) {
        var node = document.createElement('meta');
        node.name="viewport";
        node.content="initial-scale=0.1, maximum-scale=3";
        $("head").append(node);
    }
    

    This is working for all my pages with some media queries for different dpi & device width height.

提交回复
热议问题