廚老伯開槍中

簡單的 行動裝置 全畫面網頁

..我討厭 CSS...所以要學好一點(無誤?
行動裝置全螢幕網頁
弄一個全畫面 DIV,從絕對0,0開始放
指定寬高100%
弄個背景放中間..
收工,可以罵髒話了(誤

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, maximum=1.0, minimum-scale=1.0">
<style type="text/css">  
    div.fullscreen{
        display:block;
        /*set the div in the top-left corner of the screen*/
        position:absolute;
        top:0;
        left:0;
        /*set the width and height to 100% of the screen*/
        width:100%;
        height:100%;
        background:url(pic_bg.png) no-repeat center center;
    }
</style>
</head>
<body>
<div class="fullscreen">
    <h1 align="center"><br /><br />文字</h1>
</div>
</body>
</html>
comments powered by Disqus