wordpress - How do I resize the display size of woocommerce products?
问题描述
I am using woocommerce and wordpress for a small online shop. To display the products I use the woocommerce shortcode like this.
[products category="Keys" limit="2"]
The problem is that the result being displayed on the screen is too large.
How do I resize it? Do I need to add my own CSS or are there shortcode flags where I can add height and width parameters? In the attached screenshot you can see the displayed image is too wide and very long.
HOw do I resize the section that is displayed using the shortcode?
解决方案
在这里,您可以找到 WooCommerce 短代码属性的完整列表[products]
。
您可以通过将列数增加到 4 或 5(或更多)来设置columns属性,以便拥有最小的产品块:
[products category="Keys" limit="2" columns="5"]
如果这还不够,您需要添加 CSS 规则。
推荐阅读
- jquery - 在 JQuery 中将 HTML 行转换为名称值对
- c++ - Xerces-C 增加内存使用量
- javascript - Angular:FileReader - 阅读器执行太多次
- python - ansible - 为特定模块/包运行测试(来自源代码)
- javascript - 处理页面后 DropDownList 失去价值
- java - 在更少的内存中计算唯一的字符串
- ansible - 如何使用存储的 Ansible Vault 密码
- python - 如何允许 f() 取十进制值
- python - 姜戈。一对一字段。通过related_name 反转关系引发AttributeError
- javascript - 通过可观察对象将数据从组件传递到服务