【问题标题】:make mydesign fill the asp.net page让 mydesign 填充 asp.net 页面
【发布时间】:2014-12-19 18:57:37
【问题描述】:

我有一个 Asp.net 页面 我的代码是

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="fisrt_page.aspx.cs" Inherits="my_project.fisrt_page" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link rel="stylesheet" type="text/css" href="../css/login_style.css" />
    <title></title>
</head>
<body style="background: url(../images/demo/backgrounds/background_login.jpg);">

    <form id="form1" runat="server" style="height: 100%; width: 100%;">
<......................my elements.....................>
 </form>
</body>
</html>

我的设计如下图所示

https://plus.google.com/u/0/104984108592274133808/posts/4GdoUjboqi2?pid=6094624686097586866&oid=104984108592274133808

但我希望我的设计填充所有页面并将空间隐藏为我的设计中的图像 对不起,我的英语不好 但请帮帮我

我的 CSS 是

html, head, body, form {
    height: 100%;
    width: 100%;
}



.inputbox {
    background: white;
    border: 1px solid #DDD;
    border-radius: 5px;
    box-shadow: 0 0 5px #DDD inset;
    color: #666;
    outline: none;
    height: 25px;
    width: 275px;
    font-size: 20px;
}

【问题讨论】:

  • 你需要学习一些基本的 CSS 才能做到这一点
  • @charlietfl 我有一个 CSS 文件,我在里面做了很多类样式,但问题仍然存在
  • 您需要向我们提供您对 CSS 的尝试,否则我们只是为您完成所有工作。这就是现在 SO 的用途。
  • 您是否希望用叠加层覆盖整个页面?

标签: javascript jquery html css asp.net


【解决方案1】:

根据我在您的帖子中收集到的信息,您正在尝试制作一个弹出窗口,并用纯色或透明色覆盖您的背景。为此,您可以执行以下操作:

纯色:

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
}

透明色:

.overlay{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /*dim the background*/
}

要激活此功能,您可以更改使用 jQuery 来显示叠加层:

<div class="overlay" id="overlay"></div>
<script>
    $('#overlay').show();
</script>

如果您在按钮单击或其他操作中执行此操作,这当然是最好的。

我希望这会引导您朝着正确的方向前进。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-20
    • 2012-08-30
    • 2015-09-03
    相关资源
    最近更新 更多