如何设置适合谷歌浏览器或任何浏览器的asp.net网页表单大小 [英] how to set asp.net web form size fit to google chrome or in any browser

查看:105
本文介绍了如何设置适合谷歌浏览器或任何浏览器的asp.net网页表单大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<%@ Master Language="VB" CodeFile="Synionic.master.vb" AutoEventWireup="true"  Inherits="Synionic" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
      <link rel="stylesheet" type="text/css" href="stylesheet.css" />
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
    <script type="text/javascript" >
    $(document).ready(function() {      // Wait for the HTML to finish loading.
  var resize = function() {
    var height = $(window).height();  // Get the height of the browser window area.
    var element = $("body");          // Find the element to resize.
    element.height(height);           // Set the element's height.
  }
  resize();
  $(window).bind("resize", resize);
    });


        </script>
</head>
<body style="align-content:center;max-width:1250px;max-height:1000px ">
    <form id="form1" runat="server" style=" background-image: url('/img/Picture1.jpg'); width: 1250px; height: auto;background-position-x:center ;" >
        <div  style=" position:absolute;left:26px; top:100px; height: 24px; width: 158px;">
            <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server" >
            </asp:ContentPlaceHolder>
            </div>


        <div  style=" position:absolute;left:913px; top:800px; height: 28px; width: 140px;">
        <asp:ContentPlaceHolder ID="ContentPlaceHolder3" runat="server">

        </asp:ContentPlaceHolder>
            </div>

        <div  style=" position:absolute;left:100px; top:50px; height: 28px; width: 1000px;" >
            <asp:ContentPlaceHolder ID="ContentPlaceHolder4" runat="server"></asp:ContentPlaceHolder>
        </div>
    <div style="width:1250px; height:1000px; ">
        <div  style=" position:absolute;left:88px; top:352px; width: 207px; height: 24px;">
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
                </asp:ContentPlaceHolder>
    </div>
           <div  style=" position:absolute;left:86px; top:375px; width: 207px; height: 18px;">
        <asp:ContentPlaceHolder ID="ContentPlaceHolder6" runat="server">

        </asp:ContentPlaceHolder>
            </div>
        </div>
    </form>
</body>
</html>



这是我的HTML页面,请帮我解决


This is my HTML page please help me out

推荐答案

(document).ready(function(){//等待HTML到完成加载。
var resize = function(){
var height =
(document).ready(function() { // Wait for the HTML to finish loading. var resize = function() { var height =


(window).height(); //获取浏览器窗口区域的高度。
var element =
(window).height(); // Get the height of the browser window area. var element =


(body); //找到要调整大小的元素。
element.height(height); //设置元素的高度。
}
resize();
("body"); // Find the element to resize. element.height(height); // Set the element's height. } resize();


这篇关于如何设置适合谷歌浏览器或任何浏览器的asp.net网页表单大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆