微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

css – @import做什么?

我看到这段代码在哪里,我想知道@import应该做什么?我不认为这是服务器方面的事情.这是由浏览器处理??
<style type="text/css">
    @import "http://somedomain/dojo/dojo/resources/dojo.css";

    #lblTitle {
    font-size: 16px;
    color:#ffffff;
    font-weight:bold;
</style>

解决方法

The ‘@import’ rule allows users to import style rules from other style sheets. In CSS 2.1,any @import rules must precede all other rules (except the @charset rule,if present). See the section on parsing for when user agents must ignore @import rules. The ‘@import’ keyword must be followed by the URI of the style sheet to include. A string is also allowed; it will be interpreted as if it had url(…) around it.

Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification

原文地址:https://www.jb51.cc/css/215129.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。