php에서 브라우저 사이즈를 사용하는 코드
Author : 치치     Date :  2019-11-18 10:17:16   Views : 5회  
<?
  $myWidth = '<script> document.write(window.innerWidth); </script>';

  echo $myWidth;
     
  if ($myWidth < 1008) { //when i resize the browser window to 1024x768px, the echo $myWidth is 1008
   
    $setWidth = 550;
   
  echo '<div id="Panorama" style="width:'.$setWidth.'px; height:130px;overflow:hidden; background-color: transparent; margin-top:5; padding: 20px; margin-left: 0px;">';
 
  } else { //when i resize the browser window to 1280x800px, the echo $myWidth is 1264
   
  $setWidth = 750;
 
  echo '<div id="Panorama" style="width:'.$setWidth.'px; height:130px;overflow:hidden; background-color: transparent; margin-top:5; padding: 20px; margin-left: 0px;">';   
 
  }?>

 





❌Delete 🛠Modify 🐣Reply 📄List
No Subject
Author Date Like Views