2

Please visit this site: Nadpco

At first load this page, maybe less than one second, you see something like this picture: enter image description here

and then every thing will OK.

Likely this is why that, at first content loaded and then css load.

How to I resolve this problem.

Notablyو I used AngularJs and Bootstrap for create this site.

Thanks a lot.

1
  • show code where you are attaching css and js Commented Jun 24, 2015 at 7:56

3 Answers 3

1

All your stylesheets is inside the body. You need to move it inside the head instead.

From:

<body><div ng-controller="mainLayoutController" class="ng-scope">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>مشاور سرمایه گذاری نوآوران امین</title>
    <link href="/Content/css?v=4sokSQu85ZOhWi6vSDkriSC11saVOXIr5e8wfPjGMSM1" rel="stylesheet">

    <link ng-href="/Content/LTR-Bootstrap-Less/custom-less/main.min.css?v=2" rel="stylesheet" href="/Content/LTR-Bootstrap-Less/custom-less/main.min.css?v=2">
    <link ng-href="/Content/LTR-Views/News/News.min.css?v=2" rel="stylesheet" href="/Content/LTR-Views/News/News.min.css?v=2">

To:

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>مشاور سرمایه گذاری نوآوران امین</title>
    <link href="/Content/css?v=4sokSQu85ZOhWi6vSDkriSC11saVOXIr5e8wfPjGMSM1" rel="stylesheet">

    <link ng-href="/Content/LTR-Bootstrap-Less/custom-less/main.min.css?v=2" rel="stylesheet" href="/Content/LTR-Bootstrap-Less/custom-less/main.min.css?v=2">
    <link ng-href="/Content/LTR-Views/News/News.min.css?v=2" rel="stylesheet" href="/Content/LTR-Views/News/News.min.css?v=2">
Sign up to request clarification or add additional context in comments.

Comments

1

You must use css in head and js files at the end.

Comments

1

You should put links to styles in head tag:

<link href="/Content/css?v=4sokSQu85ZOhWi6vSDkriSC11saVOXIr5e8wfPjGMSM1" rel="stylesheet">
<link ng-href="/Content/LTR-Bootstrap-Less/custom-less/main.min.css?v=2" rel="stylesheet" href="/Content/LTR-Bootstrap-Less/custom-less/main.min.css?v=2">
<link ng-href="/Content/LTR-Views/News/News.min.css?v=2" rel="stylesheet" href="/Content/LTR-Views/News/News.min.css?v=2">

Also you should hide templates. It's possible by hiding content and when angular startups to show it. You can try to use ng-cloak directive or hide and show content with css classes.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.