【发布时间】:2019-01-18 08:18:15
【问题描述】:
我正在使用 Ocean-WP 子主题。我已经在子主题中创建了一个样式表,因为我知道不要向父样式表添加样式。问题是没有应用我在子样式表中编写的样式。 为什么?
/*
Theme Name: OceanWP Child
Theme URI: https://oceanwp.org/
Description: OceanWP WordPress theme example child theme.
Author:
Author URI: https://oceanwp.org/
Template: oceanwp
Version: 1.0
*/
@import url("../oceanwp/style.css");
form{
background-color:blue !important;
}
@media only screen and (min-device-width : 320px) and (max-device-width : 374px){
#page-title{
font-size:3.5rem;
}
}
【问题讨论】:
-
为什么不试试github.com/oceanwp/oceanwp-child-theme 提供的他们自己的儿童主题。删除您当前的子主题,上传并激活他们的子主题,并将您的样式放入新子主题的
style.css文件中。请注意,您不需要在子主题中使用@import url("../oceanwp/style.css");。
标签: wordpress wordpress-theming media-queries