这是functions.php文件编辑CSS媒体查询在WordPress的
function javascript_file(){
//this is the second style sheet for media query in wordpress
wp_enqueue_style('container-css', get_stylesheet_directory_uri() . '/container.css',array(),null, 'only screen and (max-width:650px)');
wp_enqueue_style('container-css');
}
//applying action on this function
add_action('init','javascript_file');
在此,我将在WordPress的媒体查询代码的一部分, 的代码在开发工具运作良好在浏览器中,但 当我把服务器的代码开始搞乱了, 换句话说没有用。
我选择的尺寸是4英寸以上的屏幕。
我们需要一些细节......实际问题是什么? CSS没有加载...? – Random
css不加载意味着 –
有两个文件,我做了加载CSS在不同的设备1> style.css的桌面2> container.css的移动。当m上传主题的服务器style.css的代码运行良好,但container.css将会失败。换句话说不能加载 –