我的页面设计在页面加载后变得扭曲(在页面加载选项卡期间显示为smaler和未对齐但在页面加载后全部恢复到正确的设计) [英] My page design getting distorted after page load (during page load tabs are visible as smaler and unaligned but after pageload all gets back to proper design)

查看:107
本文介绍了我的页面设计在页面加载后变得扭曲(在页面加载选项卡期间显示为smaler和未对齐但在页面加载后全部恢复到正确的设计)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



各位技术爱好者在这个论坛中可以使用

我正在使用以下代码,我正在使用更新面板

问题是我使用jquery来对齐我的页面中使用的选项卡

但是当页面加载时,选项卡会变形并看起来像初始阶段li元素并且未对齐

这种情况​​正在发生,因为我使用了一些服务来调用一些otehr服务来获取数据,这需要1-2秒,因此在该时间框架中页面看起来很扭曲,因为我知道用于保持的jquery在加载整个html并执行代码后调用制表符

亲切帮助



< script src =/ _ layouts /1033/STYLES/js/commonstyles/js/jquery.uniform.jstype =text / javascript

charset =utf-8>< / script>

< script src =/ _ layouts / 1033 / STYLES / js / commonstyles / js / jquery.uniform.min.jstype =text / javascript

charset =utf -8\" >< / script>



< asp:ScriptManagerProxy ID =scriptmanagerproxy1runat =server>

< Scripts>

< asp:ScriptReference Path =/ _ layouts / 1033 / STYLES / js / js / Script.js/>

< / Scripts>




Hi every Tech geek avilable in this forum
I am using the following code and i am using update panel
The issue is that i am using jquery for the alignment of the tabs used in my page
but when ever the page gets loaded the tabs gets distorted and looks as the initial stage li element and are un aligned
This is happening as i have used few service which call some otehr serices for data and it takes 1-2 seconds so in that timne frame the page looks distorted and as i know the jquery which is used to keep align the tabs is called after the whole html is loaded and code behind is executed
kindly help

<script src="/_layouts/1033/STYLES/js/commonstyles/js/jquery.uniform.js" type="text/javascript"
charset="utf-8"></script>
<script src="/_layouts/1033/STYLES/js/commonstyles/js/jquery.uniform.min.js" type="text/javascript"
charset="utf-8"></script>

<asp:ScriptManagerProxy ID="scriptmanagerproxy1" runat="server">
<Scripts>
<asp:ScriptReference Path="/_layouts/1033/STYLES/js/js/Script.js" />
</Scripts>

Quote:

< asp:UpdatePanel ID =UpdatePanel1runat =server>

< contenttemplate>

< asp:UpdateProgress ID =UpdateProgress1runat =serverAssociatedUpdatePanelID =UpdatePanel1

DynamicLayout = true>

< progresstemplate>

正在加载......







<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<contenttemplate>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
DynamicLayout="true">
<progresstemplate>
Loading...








  • Pending Proposal
  • Create Customer
  • Add a Customer
  • Search Your Customer(s)
  • Pending Inspection
  • Pending Submission
  • <!--
  • News
  • -->





等...........

等....





任何一个帮助

etc...........
etc....


any one help

推荐答案

浏览器时加载网页首先必须加载内容,而不是为此构建对象模型(DOM),就像JavaScript运行和应用设计的最后一步一样(这就是为什么尽可能多地将设计移动到CSS的原因)。

在您的情况下,页面的加载/呈现阶段花费了太多时间(内容太多?)因此JavaScript必须等待。当所有内容都可用时,JavaScript运行并且一切都井然有序。

我会将这种行为视为设计问题......
When browser loads a web page first it have to load the content, than build a object model (DOM) for that, and just as the last step the JavaScript will run and apply the design (that's the reason to move as much design as possible to CSS).
In your case the loading/rendering phase of the page took too much time (too much content?) so JavaScript have to wait. When all content is available JavaScript runs and everything is in order.
I would consider such behavior as design problem...


这篇关于我的页面设计在页面加载后变得扭曲(在页面加载选项卡期间显示为smaler和未对齐但在页面加载后全部恢复到正确的设计)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆