简体   繁体   English

设定负荷指示器的位置

[英]setting Position of Loading-indicator

I defined a Loading-Indicator, and have some problem with the position. 我定义了一个加载指示器,并且该位置有一些问题。 My problem is 我的问题是
positioning the loading indicator when its seen through different machines with different resolution or screen size. 当通过不同分辨率或屏幕尺寸的不同机器看到加载指示器时,请将其定位。 how can i fix it! 我该如何解决!

here is my code: 这是我的代码:

<body class="loadPage">
<form id="form1" runat="server">
  <asp:ScriptManager ID="ScriptManager1" runat="server">
  </asp:ScriptManager>

  <div id="loadingLogo">
     <asp:Image ID="Image1" runat="server" ImageUrl="Images/Logo.png" />
     <hr class="line"/>
  </div>

  <div id="loadingIndicator" >
     <syncfusion:WaitingPopup ID="WaitingPopup1" runat="server" CloseTimeOut="2000"    
                 ClientObjectID="Popup1" PositionParent="Screen"
                 Width="250px" Height="50px" Alignment="MiddleRight"  
                 InitiallyShown="True" DisableOnShowElementID="loadingIndicator">
     </syncfusion:WaitingPopup>
  </div>

</form>

You do not write where you want it positioned, but i would recommend using position: absolute; 您不写您希望它定位的位置,但我建议您使用position:absolute; or position: fixed; 或位置:固定; See http://www.w3schools.com/cssref/pr_class_position.asp 参见http://www.w3schools.com/cssref/pr_class_position.asp

If you want it center the css could be something like 如果您希望它居中,则CSS可能类似于

#loadingIndicator {
position: absolute;
width: 200px;
left: 50%;
margin-left: -100px;
top: 10px;
}

Margin-left should be minus half the width of your loadginIndicator, to center it. 左边距应为负负的loadginIndicator宽度的一半。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM