圆角图片

来源:互联网 发布:Java 排序算法 编辑:程序博客网 时间:2024/05/16 19:28

我们用的图片一般都是方形的,如何造成圆形?原理就是用CSS3的属性,知识点如下:

一、DIV  圆角化,属性:border-radius: 50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;



预览:

点击打开链接



<!DOCTYPE html><html><head><title></title></head><body><div style="text-align: center;"><img style="border-radius: 50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;" id='userInfo' alt="" width="70px" height="70px" src='http://shp.qpic.cn/bizmp/4bicyswBBKE2CKDBicu5GWMWHWjorC8pseIgkxtxhfsxfxx6kGtIicZPw/'></div></body></html>


0 0
原创粉丝点击