0
這與我在Wordpress中建立的網站有關。我無法使Pretty Photo Lightbox適用於小型屏幕設備。默認情況下,它會在手機上打開一個非常小且不可用的燈箱。我已經找到了幾條關於如何修復它的線索,而且似乎沒有任何關鍵。有沒有人在這裏成功地完我正在使用它與對齊圖像網格插件。謝謝!漂亮的照片在手機上的燈箱/視頻 - 太小
這與我在Wordpress中建立的網站有關。我無法使Pretty Photo Lightbox適用於小型屏幕設備。默認情況下,它會在手機上打開一個非常小且不可用的燈箱。我已經找到了幾條關於如何修復它的線索,而且似乎沒有任何關鍵。有沒有人在這裏成功地完我正在使用它與對齊圖像網格插件。謝謝!漂亮的照片在手機上的燈箱/視頻 - 太小
我使用移動檢測來自http://mobiledetect.net/
在我的PHP文件,我包括mobile_detect.php
併爲您的移動設備如下:
<?php
include 'Mobile_Detect.php';
$detect = new Mobile_Detect();
?>
//prettyPhoto js goes here
......
<a id="video_link" href="https://www.youtube.com/watch?v=qKhsb0bxuRo&rel=0"
<?php
if ($detect->isMobile() && !$detect->isTablet()) {
echo ""; //hide from iphones and force iOS to open YouTube app instead
}elseif ($detect->isTablet){
echo "rel=\"prettyPhoto\""; //show prettyPhoto on tablets
}else{
echo "rel=\"prettyPhoto\""; //also show prettyPhoto popup on desktops
}
?>
title=""><img src="images/play-video.png" alt="" title="" width="380" height="147" /></a>