我有一个联系表格7,提交联系表格后会显示一条消息。 当我尝试将整个消息分成两种不同的颜色时,我的问题就出现了。 我能做到这一点吗?我创建了一个span类来改变字符串某些部分的颜色,因为你可以看到iI最后发布了。但它显示没有任何html或css标签效果。
**Your query has been submitted. <span style="color:green;">A member of staff will be in contact soon.</span>**
`div.wpcf7-mail-sent-ok span {
border: none;
font-weight: normal !important;
color: red !important font-size:24px !important;
position: relative !important;
width: 840px;
line-height: 26px;
}`
希望你理解,任何帮助都将不胜感激....谢谢
my html tag are not working, I have output like "Your query has been submitted. <span style="color:green;">A member of staff will be in contact soon.</span>", see there is span tag coming as plain text
答案 0 :(得分:0)
嗨,请替换此代码而不是旧样式......
div.wpcf7-mail-sent-ok span {
border: none;
font-weight: normal !important;
color: #ff0000 !important;
font-size:24px !important;
position: relative !important;
width: 840px;
line-height: 26px;
}
我认为您没有在color和font-size属性之间添加分号(;)
。
答案 1 :(得分:0)
在颜色:红色!重要
之后添加一个半冒号div.wpcf7-mail-sent-ok span {
border: none;
font-weight: normal !important;
color: red !important;
font-size:24px !important;
position: relative !important;
width: 840px;
line-height: 26px;
}