"z-index" 在 php GD

"z-index" in php GD

在css中,我们有一个属性叫做“z-index”,在PHP中GD和Image是一样的控制“z-index”的函数?

我一直在寻找,但找不到,请帮忙。 谢谢

php GD 库中没有像 z-index 这样的东西 但是有几种方法可以将图像重叠在图像上或文本重叠在图像上

$redimg = imagecreatetruecolor(100, 100);
$image = imagecreatefrompng('image.png');

// sets background to red
$red = imagecolorallocate($redimg, 255, 0, 0);
imagefill($redimg, 0, 0, $red);

// Merge the red image onto the PNG image
imagecopymerge($image, $redimg, 0, 0, 0, 0, 100, 100, 75);

header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
imagedestroy($redimg);

举个例子,或者告诉我,你到底想做什么,我会帮你 还有更多信息 here