我有一个aspx页面,并在其中将图像放在100%宽度和高度的div中,并在Visual Studio,asp.net页面上显示多个显示文本标签...在设计模式下显示标签和设置背景图像,但在运行时不显示文本。我该怎么办? 这是我的代码:
<head runat="server">
<title></title>
<style type="text/css">
body {
margin: 0;
padding: 0;
background-color: #FAFAFA;
font: 10pt "Tahoma";
}
* {
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.page {
width: 21cm;
min-height: 29.7cm;
padding: 0px;
margin: 0px auto;
border: 1px #D3D3D3 solid;
border-radius: 5px;
background: white;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
@page {
size: A4;
margin: 0;
}
@media print {
.page {
margin: 0;
border: initial;
border-radius: initial;
width: initial;
min-height: initial;
box-shadow: initial;
background: initial;
page-break-after: always;
}
}
</style>
</head>
<body dir="rtl">
<form id="form1" runat="server">
<div>
<div class="page">
<img src="../Images/waybill-HighReso.jpg" height="100%" width="100%"/>
<%------------------------------shipper----------------------------%>
<div style=" z-index:1000; position:absolute;left:180px; top:58px;">
<asp:Label ID="shipperCode" runat="server" Text="shipperCode"></asp:Label>
</div>
<div style=" z-index:1000; position:absolute;left:360px; top:58px;">
<asp:Label ID="shipperName" runat="server" Text="shipperName"></asp:Label>
</div>
<div style=" z-index:1000; position:absolute;left:360px; top:85px;">
<asp:Label ID="shipperTel" runat="server" Text="shipperTel"></asp:Label>
</div>
<div style=" z-index:1000; position:absolute;left:360px; top:105px;" >
<asp:Label ID="shipperFrom" runat="server" Text="shipperFrom"></asp:Label>
</div>
</div>
</form>
</body>
答案 0 :(得分:0)
这可以通过删除正文
的属性来正常工作<body dir="rtl"> ====> <body>