我想更改某些屏幕尺寸的Wordpress TopBar插件中的实际内容,例如iPad,平板电脑和iPad。移动。 不太确定为什么这不起作用,有人可以建议吗?
@media screen and (max-width: 767px) {
#tpbr_box {
content: "Register for 10% Discount";
}
#tpbr_calltoaction {
content: "Yes Please!";
}
}
tpbr_bx =带有需要更改的文字的顶栏
tpbr_calltoaction =包含需要更改的文字的按钮
答案 0 :(得分:0)
谢谢安德鲁! 它使用以下内容更改为正确的文本:
<webResources>
<!-- in order to interpolate version from pom into appengine-web.xml -->
<resource>
<directory>${basedir}/src/main/webapp/WEB-INF</directory>
<filtering>true</filtering>
<targetPath>WEB-INF</targetPath>
</resource>
</webResources>
现在唯一的问题是它没有延续原始的旧CSS格式。如:
@media screen and (max-width: 767px) {
#tpbr_box,
#tpbr_calltoaction {
visibility: hidden;
position: relative;
}
#tpbr_box:after {
visibility: visible;
content: "Register for 10% Discount" !important;
}
#tpbr_calltoaction:after {
visibility: visible;
content: "Yes Please!" !important;
}
}
我可以轻松地将这些添加到我想的:after 部分。
然后最后一个问题是按钮 tpbr_calltoaction 出现在文本 tpbr_box 上方。它为什么要这样做?当然,正常的做法是按照代码中的顺序执行它们,哈哈。