如何在divi代码模块中应用样式?

时间:2018-05-09 17:08:14

标签: html css wordpress wordpress-theming

我有一个HTML,我在 DIVI代码模块的内容部分中使用过(如下所示):


HTML(目前在内容中):

<blockquote><span>BPRO helped me realize the importance of cus- tomer organization and tracking, service track- ing and just being on the top of things behind the scene. The more you grow – the more difficult this becomes – but having the right tools to keep your business organized is just as impor- tant as having the right tools to do job itself.</span> <p>Some Person - Some Day 2018</p></blockquote>


enter image description here




CSS:

我也有一个CSS 我想申请内容中的HTML代码。我想知道我应该把我的css代码放在哪里。我拥有的CSS代码是:

blockquote {
  padding: 20px 60px;
  background: #eee;
  border-radius: 10px;
  font-family: arial;
  line-height: 1.625;
  position: relative;
}

blockquote p {
  text-align: center;
}

blockquote span {
  position: relative;
  display: inline-block;
}

blockquote span:before {
  content: "“";
  font-size: 72px;
  color: #79b83a;
  position: absolute;
  left: -40px;
  top: 40px;
  line-height: 0;
}

blockquote span:after {
  content: "”";
  font-size: 72px;
  color: #79b83a;
  position: absolute;
  right: -40px;
  bottom: -10px;
  line-height: 0;
}





问题陈述:

我想知道我应该把上面的CSS代码放在哪里。 我尝试将代码放在代码模块设置的高级部分的main元素中,但它不起作用

enter image description here

2 个答案:

答案 0 :(得分:1)

我发现你昨天正在使用 code I wrote

您可以将HTML保留在Divi模块中,并将CSS放入外观&gt; 定制工具&gt; 其他CSS 部分

编辑:看起来Divi有custom CSS部分以及Per Module, Row, and Section CSS option,但我建议尽可能少地保留自定义CSS。

答案 1 :(得分:0)

您也可以将CSS放入Divi Code Module Content区域,只需使用'style'标签:

<style> 

your css code goes here:

blockquote {
  padding: 20px 60px;
  background: #eee;
  border-radius: 10px;
  font-family: arial;
  line-height: 1.625;
  position: relative;
}
... etc



</style>