主页 > 网站建设 > 建站知识 > 如何修改织梦CMS水印的位置

如何修改织梦CMS水印的位置

POST TIME:2020-03-28 23:52

今天想把个人的网站进行一些美工,突然发现织梦CMS系统默认水印的位置与图片边线相隔5像素,感觉很不美观。为此我进行水印的坐标的修改,下面把我的修改方法和大家共享下。我的方法如下:

首先,请大家找到include目录下的image.class.php文件,然后查找以下代码:

x = +5;

$y = +5;

break;

case 2:

$x = ($imagewidth - $logowidth) / 2;

$y = +5;

break;

case 3:

$x = $imagewidth - $logowidth - 5;

$y = +5;

break;

case 4:

$x = +5;

$y = ($imageheight - $logoheight) / 2;

break;

case 5:

$x = ($imagewidth - $logowidth) / 2;

$y = ($imageheight - $logoheight) / 2;

break;

case 6:

$x = $imagewidth - $logowidth - 5;

$y = ($imageheight - $logoheight) / 2;

break;

case 7:

$x = +5;

$y = $imageheight - $logoheight - 5;

break;

case 8:

$x = ($imagewidth - $logowidth) / 2;

$y = $imageheight - $logoheight - 5;

break;

case 9:

$x = $imagewidth - $logowidth - 5;

$y = $imageheight - $logoheight -5;

break;

栏目从1-9,也就是水印的位置,和下表是相对应的,这里你就可以修改后面的数据修改坐标了。

顶部居左 顶部居中 顶部居右

左边居中 图片中心 右边居中

底部居左 底部居中 底部居右

例如:想把水印图与原图的右底重合,就把第九项的两个“5”修改为“0”即可,以此类推,如果想把水印的位置往左上移动20像素,则修改为20即可。



收缩
  • 微信客服
  • 微信二维码
  • 电话咨询

  • 400-1100-266