本文介绍了将图像剪裁为网页中的六角形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在网页中有图片。我想将四边形图像转换成六边形图像。即修剪边缘并将图像转换为六边形形状。
I have an image in a web page. I want to convert the four-sided image into a six-sided one. i.e. Crop the edges and convert the image into an hexagon shape.
如何在服务器端使用PHP ImageMagick / GD。我使用XAMPP服务器来构建一个示例网页。或者有更好的方法使用Javascript / CSS通过使用img样式属性。
How can I do it using PHP ImageMagick/GD on my server side. I am using XAMPP server to build a sample web page. Or is there a better way to do it using Javascript/CSS by making use of img style attributes.
推荐答案不太痛苦的CSS(你甚至不需要JS这个)。
It'll be less painful in CSS (you don't even need JS on this).
看到这个小提琴 jsfiddle/kizu/bhGn4/
更多推荐
将图像剪裁为网页中的六角形
发布评论