HUSKY - Products Filter Professional for WooCommerce

如何根据设备操纵网站 CSS

Sometimes users need manipulate the site css depending of the client device <PC or Mobile>. You can do it with the next code example, which should be placed on the file footer.php 您当前 WordPress 主题的:

<?php 
if (WOOF_HELPER::is_mobile_device()): ?>
 <style type="text/css">
                .woof_show_auto_form {
                    display: inline-block !important;
                }
            </style>

            <?php else: ?>
            <style type="text/css">
                .woof_show_auto_form {
                    display: none !important;
                }
            </style> 
<?php endif; ?>

在当前示例中,展示了如何在 PC 上隐藏 woof 自动表单按钮,以及如何在移动设备上显示它……