0

我在<head>我的页面中添加这些媒体查询:

<style type="text/css">

    @media only screen 
    and (min-device-width : 320px) 
    and (max-device-width : 480px) {
        @import url('assets/css/style-smartphones.css');
    }

    /* iPads (portrait and landscape) ----------- */
    @media only screen 
    and (min-device-width : 768px) 
    and (max-device-width : 1024px) {
        @import url('assets/css/style-tablet.css');
    }

    /* Desktops and laptops ----------- */
    @media only screen 
    and (min-width : 1224px) {
        @import url('assets/css/style-desktop.css')
    }

</style>

但是没有加载样式表文件。我仔细检查了路径,它们是正确的......我错过了什么?

4

1 回答 1

0

我自己这样修复的:

    @import url('assets/css/style-smartphones.css') only screen 
            and (min-device-width : 320px) and (max-device-width : 480px);
    @import url('assets/css/style-tablet.css') only screen 
            and (min-device-width : 768px) and (max-device-width : 1024px);
    @import url('assets/css/style-desktop.css') only screen 
            and (min-width : 1224px);
于 2013-10-27T11:41:41.470 回答