0
<%@ Master Language="C#" %>
<%@ Import Namespace="System.Globalization" %>
<!DOCTYPE html>
<script runat="server">
void page_load()
{
PersianCalendar pc = new PersianCalendar();
day.Text = pc.GetDayOfWeek(DateTime.Now).ToString();
hour.Text = string.Format("{0} : {1} : {2}", DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<style type="text/css">
body{
background-color:#FFFACD;
}
#Main{
margin:5px;
}
#Title{
background-color:#F0FFFF;
height:50px;
position:relative;
top: 0px;
left: 0px;
}
#Title span{
background-color:#FDF5E6;
text-align:center;
font-family:"Sakkal Majalla";
font-size:larger;
margin-top:7px;
border:solid 1px #DEB887;
display:block;
width:60px;
height:35px;
float:left;
}
#hour{
background-color:red;
}
</style>
<title></title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div id="Main">
<div id="Title">
<span style="float:right;margin-right:10px;">به نام خداوند جان و خرد</span>
<span style="margin-left:5px"><asp:Label runat="server" ID="hour">aaa</asp:Label></span>
<span style=" ">ساعت</span>
<span style=" "><asp:Label runat="server" ID="day" BorderWidth="0px" Font-Names="Sakkal Majalla" Font-Size="Large" BackColor="#3366FF" Height="15px"></asp:Label></span>
<span style=" ">امروز</span>
</div>
</div>
</form>
</body>
</html>
정말 저에게 이상합니다! 전체 코드는 여기에 있습니다 ... 왜 label_id = hour의 배경색을 변경하지 않았습니까 ??? 내가 실수 한 곳? 도와주세요 ! 나는 당신의 자신의 대 그것을 테스트하시기 바랍니다 코드를 새로 고침!라벨 배경색이 작동하지 않습니다.
그것이 작동하고 있는지 확인하십시오 .. http://jsfiddle.net/rpku6d89/5/ –
나는 잘 작동하고 있지만 나는 배경색을