Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有没有办法生成正方形的头像 #12

Open
slince opened this issue Nov 10, 2017 · 10 comments
Open

有没有办法生成正方形的头像 #12

slince opened this issue Nov 10, 2017 · 10 comments

Comments

@slince
Copy link

slince commented Nov 10, 2017

css控制已经有圆角了

@lincanbin
Copy link
Owner

把imagefilledellipse换成填充背景。

@lincanbin
Copy link
Owner

这个的目的只是为了实现跨平台头像体验的一致性,比如在Android或者iOS或者浏览器里,可以看到风格一致的头像。

如果你打算用CSS实现,正方形头像用CSS实现岂不是更方便。

@kuan123
Copy link

kuan123 commented Jan 2, 2019

所以说,生成的圆形图片怎么显示成正方形?

@lincanbin
Copy link
Owner

@kuan123 图片本来就是正方形啊

@kuan123
Copy link

kuan123 commented Jan 2, 2019

@lincanbin 有背景颜色的不是圆形吗?其他背景是透明的!

@kuan123
Copy link

kuan123 commented Jan 2, 2019

@lincanbin 现在做的项目需要正方形的有名字首字母的头像!

@kuan123
Copy link

kuan123 commented Jan 2, 2019

@lincanbin 就像你的github的头像一样

@lincanbin
Copy link
Owner

@kuan123
Copy link

kuan123 commented Jan 2, 2019

好的,多谢,你有时间可以完善一下,可以支持两种方式,点赞!

@lincanbin
Copy link
Owner

lincanbin commented Jan 2, 2019

@kuan123 矩形不会是未来的趋势了,现在连手机屏幕都切矩形圆角了,以后多半只有圆形和矩形圆角。
新版的微信7.0 也抛弃了完全矩形的头像了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants