【问题标题】:How to make responsiveness for shortcodes in wordpress如何在 wordpress 中对短代码做出响应
【发布时间】:2015-02-18 04:55:29
【问题描述】:

我正在使用海洋主题,我想使用 wordpress 短代码为我的背景图像做出响应。

例子:

[highlight background-image="my_background_image.jpg" 
  background-position="center center" background-stretch="yes"]
 [/highlight]

如果我尝试通过此方法使图像具有响应性,则背景图像的大小在移动设备上会缩小。

有没有办法在 wordpress 中编写媒体查询 css?

我的问题的任何替代解决方案?

【问题讨论】:

  • 这个短代码生成的标记是什么?

标签: css wordpress


【解决方案1】:

这一切都应该在您的 .css 文件中完成,无论您是否使用短代码。以下是您可以用作响应式样式示例的一些宽度:

@media all and (min-width: 1024px) and (max-width: 1280px) { ... }

@media all and (min-width: 768px) and (max-width: 1024px) { ... }

@media all and (min-width: 480px) and (max-width: 768px) { ... }

@media all and (max-width: 480px) { ... }

把这些放在你的style.css

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-09-16
    • 1970-01-01
    • 1970-01-01
    • 2013-10-18
    • 1970-01-01
    • 2022-10-13
    • 2013-11-24
    相关资源
    最近更新 更多