在body标签中加载外部css文件 [英] load external css file in body tag

查看:675
本文介绍了在body标签中加载外部css文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

如果我把css文件放在< head>或< body>


通常,外部css文件加载代码

 < head> 

...
< link href =/ uploadify / uploadify.csstype =text / css =stylesheet/>
...

< / head>

但有时我应该把我的css加载代码在body标签,
我的意思。 。

 < body> 
...
< link href =/ uploadify / uploadify.csstype =text / css =stylesheet/>
...
< / body>

所以我的问题是,
可以把我的css加载代码在body标签?

解决方案

风格在身体中起作用,但身体可以在头部之前完成,所以你的元素可以没有风格。 / p>

Possible Duplicate:
What's the difference if I put css file inside <head> or <body>?

usually, external css file loading code is put on header of html.

<head>

...
<link href="/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
...

</head>

but, sometime I should put my css loading code in body tag, I mean..

<body>
...
<link href="/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
...
</body>

so my question is, is it okay to put my css loading code in body tag?

解决方案

Style works in body, but body can be done before head so your elements can be without style for a moment.

这篇关于在body标签中加载外部css文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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