嵌套母版页和半透明

<%--程序名称:9-03.aspx--%>
<%--程序功能:引用子母版页的内容页--%>
<%@ Page Language="C#" MasterPageFile="~/SMasterPage.master"
     AutoEventWireup="true" CodeFile="9-03.aspx.cs"
     Inherits="_9_03" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
   Runat="Server">
我是引用子母版页的内容页
</asp:Content>

<asp:Content ID="xu" ContentPlaceHolderID="Content2" runat="server">
&nbsp;
<table width="100px" style="background-color:Transparent;  filter:Alpha(opacity=100); position:absolute;" >
<tr>
<td align="center" style="filter:Alpha(opacity=30);" >I am xuhaitian</td>
</tr>
</table>
</asp:Content>

 

<%--程序名称:FMasterPage.master--%>
<%--程序功能:父母版页--%>
<%@ Master Language="C#" AutoEventWireup="true"
  CodeFile="FMasterPage.master.cs" Inherits="FMasterPage" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h1>我是父母版页</h1>
        <asp:contentplaceholder id="MainContent" runat="server">
        </asp:contentplaceholder>
        <h1>我是父母版页</h1>
    </div>
    </form>
</body>
</html>

 

 

<%--程序名称:FMasterPage.master--%>
<%--程序功能:引用父母版页的子母版页--%>
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="SMasterPage.master.cs"
    Inherits="SMasterPage"  MasterPageFile="~/FMasterPage.master"%>

<asp:Content id="Content1" ContentPlaceholderID="MainContent" runat="server">
   <asp:panel runat="server" id="panelMain" backcolor="lightyellow">
   <h2>我是子母版页</h2>
      <asp:panel runat="server" id="panel1" backcolor="lightblue">
        <p>我是子母版页的content部分.</p>
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server" />
      </asp:panel>
      <asp:panel runat="server" id="panel2" backcolor="lightblue">
         <p>我是子母版页的content部分.</p>
         <asp:ContentPlaceHolder ID="Content2" runat="server" />
      </asp:panel>
   </asp:panel>
</asp:Content>

 

 

半透明说明 :

<tr>
  <td valign="top" width="620px" style="font-size:12px;font-family:宋体color:#00ff00;height:auto;background-color:#999999;filter:Alpha(opacity=30);border-left:1px solid #ffffff;border-right:1px solid #ffffff;">

  <table border="0" cellspacing="0" cellpadding="0" style="filter:Alpha(opacity=100);">


设置table背景色半透明的,不料连里面的文字也半透明了,在网上看看说在table中加上filter:Alpha(opacity=100),就可以让内容不为透明请问如何解决?

你可以把里边table的position设为absolute,这样就不会出现这种情况了。不过这个时候需要明确指定一下父table的height。 
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值