如何让我的应用适合整个屏幕

How to make my app fit the whole screen

我正在不同的电视屏幕上开发一个应用程序,除 LG 32LJ57 WebOS 外,在每个平台上一切正常,布局由于某种原因不适合整个屏幕,我尝试了不同的东西, 1) 添加元标记以适合屏幕,2) 增加分辨率(注意默认分辨率为 1920x1080),但没有任何变化,而且,当我在 LG webOS 模拟器上测试时,一切都非常适合但不适合实际屏幕,感谢您协助

<html>
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="format-detection" content="telephone=no">
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="viewport" content="user-scalable=no, initial-scale=1, 
     maximum-scale=1, minimum-scale=1, width=device-width">
    <meta name='viewport' content='height=device-height'>
    <link rel="stylesheet" 
 
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" 
integrity="sha384- 
Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" 
crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="css/index.css">
    <title>Libya TV</title>
</head>

<body>
    <section id="deviceready">
        <div class="row h-100 align-items-center text-center">
            <div class="col-xl-5 offset-xl-6">
                <div class="row row1">
                    <div class="col-xl-4">
                        <a id="0" class="logo" onclick="playMedia(0)"><img 
                               src="./img/Kids.png" class="img-fluid"></a>
                    </div>
                    <div class="col-xl-4">
                        <a id="1" class="logo" onclick="playMedia(1)"><img 
                               src="./img/sport.png" class="img-fluid"></a>
                    </div>
                    <div class="col-xl-4">
                        <a id="2" class="logo" onclick="playMedia(2)"><img 
                               src="./img/beauty.png" class="img-fluid"></a>
                    </div>
                </div>
                <div class="row row2">
                    <div class="col-xl-4">
                        <a id="3" class="logo" onclick="playMedia(3)"><img 
                               src="./img/doc.png" class="img-fluid"></a>
                    </div>
                    <div class="col-xl-4">
                        <a id="4" class="logo" onclick="playMedia(4)"><img 
                           src="./img/libyaTv.png" class="img-fluid"></a>
                    </div>
                    <div class="col-xl-4">
                        <a id="5" class="logo" onclick="playMedia(5)"><img 
                           src="./img/movies.png" class="img-fluid"></a>
                    </div>
                </div>

                <div class="row row3">
                    <div class="col-xl-4">
                        <a id="6" class="logo" onclick="playMedia(6)"><img 
                          src="./img/series.png" class="img-fluid"></a>
                    </div>
                    <div class="col-xl-4">
                        <a id="7" class="logo" onclick="playMedia(7)"><img 
                          src="./img/kojina.png" class="img-fluid"></a>
                    </div>

                    <div class="col-xl-4">
                        <a id="8" class="logo" onclick="playMedia(8)"><img 
                         src="./img/music.png" class="img-fluid"></a>
                    </div>
                </div>

                <div class="row row4">
                    <div class="col">
                        <p>
                            <span>NILESAT 11526 H</span>
                 <img src="./img/Layer%2015.png" class="img-fluid">
                 <img src="./img/square-twitter-256.png" class="img-fluid">
                 <img src="./img/app-icon21.png" class="img-fluid">
                            @Libyatvnetwork
                        </p>
                    </div>
                </div>

                <div class="row row5 ">
                    <div class="offset-1 ">
         <img src="./img/Layer%2016.png" class="img-fluid ">
         <img src="./img/appstore-icon-mobile-retina.png" class="img-fluid">
         <img src="./img/Group%2010%20copy.png" class="img-fluid">
                    </div>
                </div>
            </div>
        </div>
    </section>





    <link rel="stylesheet" href='css/video.css'>

    <script type="text/javascript" src="cordova.js"></script>
    <script type="text/javascript" src="toast.js"></script>
    <script type="text/javascript" src="js/init.js"></script>
    <script type="text/javascript" src="js/media.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
</body>

这是我用于我的应用程序的元标记,请尝试添加 viewport-fit=cover

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">

请添加您的 CSS,包含的行 div 是否有宽度?使用 container-fluid 包含 bootstrap 中的行:

https://getbootstrap.com/docs/4.0/layout/overview/ - 尝试使用 class 容器流体将行包装在 div 中:

<div class="container-fluid">
    <div class="row h-100 align-items-center text-center">
        <div class="col-xl-5 offset-xl-6">
            <div class="row row1">
                <div class="col-xl-4">
                    <a id="0" class="logo" onclick="playMedia(0)"><img 
                           src="./img/Kids.png" class="img-fluid"></a>
                </div>
                <div class="col-xl-4">
                    <a id="1" class="logo" onclick="playMedia(1)"><img 
                           src="./img/sport.png" class="img-fluid"></a>
                </div>
                <div class="col-xl-4">
                    <a id="2" class="logo" onclick="playMedia(2)"><img 
                           src="./img/beauty.png" class="img-fluid"></a>
                </div>
            </div>
            <div class="row row2">
                <div class="col-xl-4">
                    <a id="3" class="logo" onclick="playMedia(3)"><img 
                           src="./img/doc.png" class="img-fluid"></a>
                </div>
                <div class="col-xl-4">
                    <a id="4" class="logo" onclick="playMedia(4)"><img 
                       src="./img/libyaTv.png" class="img-fluid"></a>
                </div>
                <div class="col-xl-4">
                    <a id="5" class="logo" onclick="playMedia(5)"><img 
                       src="./img/movies.png" class="img-fluid"></a>
                </div>
            </div>

            <div class="row row3">
                <div class="col-xl-4">
                    <a id="6" class="logo" onclick="playMedia(6)"><img 
                      src="./img/series.png" class="img-fluid"></a>
                </div>
                <div class="col-xl-4">
                    <a id="7" class="logo" onclick="playMedia(7)"><img 
                      src="./img/kojina.png" class="img-fluid"></a>
                </div>

                <div class="col-xl-4">
                    <a id="8" class="logo" onclick="playMedia(8)"><img 
                     src="./img/music.png" class="img-fluid"></a>
                </div>
            </div>

            <div class="row row4">
                <div class="col">
                    <p>
                        <span>NILESAT 11526 H</span>
             <img src="./img/Layer%2015.png" class="img-fluid">
             <img src="./img/square-twitter-256.png" class="img-fluid">
             <img src="./img/app-icon21.png" class="img-fluid">
                        @Libyatvnetwork
                    </p>
                </div>
            </div>

            <div class="row row5 ">
                <div class="offset-1 ">
     <img src="./img/Layer%2016.png" class="img-fluid ">
     <img src="./img/appstore-icon-mobile-retina.png" class="img-fluid">
     <img src="./img/Group%2010%20copy.png" class="img-fluid">
                </div>
            </div>
        </div>
    </div>
</div>

可能电视无法处理1080分辨率的应用程序(http://webostv.developer.lge.com/discover/specifications/webos-tv-platform/supported-app-resolution/)

我猜你已经用 'resolution': '1920x1080' 配置了 appinfo.json,但你还设置了设备宽度为 1280 (content ="width=device-width") 的 HTML 应用程序,所以基本上电视正在尝试使用两种不同的尺寸

要支持这些电视,您必须发布两个具有两个不同 appinfo.json 的应用程序,一个用于 1080 ("resolution": "1920x1080"),另一个用于 720 ("resolution": "1280x720")