CSS-在IE中调整图像大小丢失分辨率(别名)

CSS-在IE中调整图像大小丢失分辨率(别名),css,internet-explorer,resize,image-resizing,antialiasing,Css,Internet Explorer,Resize,Image Resizing,Antialiasing,我有一个布局,可以调整我的图像大小!但我在InternetExplorerV.11中遇到了别名问题。我尝试了一些修复,但没有成功!我能做些什么来排除故障 CSS JSFIDLE:请使用internet explorer打开使用PHP图像调整脚本 下面是PHP.net中的一个示例: <?php // File and new size $filename = 'test.jpg'; $percent = 0.5; // Content type header('Content-Type:

我有一个布局,可以调整我的图像大小!但我在InternetExplorerV.11中遇到了别名问题。我尝试了一些修复,但没有成功!我能做些什么来排除故障

CSS


JSFIDLE:请使用internet explorer打开

使用PHP图像调整脚本 下面是PHP.net中的一个示例:

<?php
// File and new size
$filename = 'test.jpg';
$percent = 0.5;

// Content type
header('Content-Type: image/jpeg');

// Get new sizes
list($width, $height) = getimagesize($filename);
$newwidth = $width * $percent;
$newheight = $height * $percent;

// Load
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);

// Resize
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);

// Output
imagejpeg($thumb);
?>

希望它有帮助

或者使用HTTP_USER_代理,而不是重复使用linux,然后使用CSS部分。不需要php参与,朋友,浏览器必须得到我们想要的结果谢谢你找到了解决办法:-[if!IE]>或者看看另一篇stackoverflow文章:希望它解决了这个问题:这取决于js而不仅仅是css。谢谢
<?php
// File and new size
$filename = 'test.jpg';
$percent = 0.5;

// Content type
header('Content-Type: image/jpeg');

// Get new sizes
list($width, $height) = getimagesize($filename);
$newwidth = $width * $percent;
$newheight = $height * $percent;

// Load
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);

// Resize
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);

// Output
imagejpeg($thumb);
?>
<?php
$u_agent = $_SERVER['HTTP_USER_AGENT'];

//First get the platform
if (preg_match('/linux/i', $u_agent)) {
    echo 'linux';
}
?>