转载自:http://www.w2bc.com/Article/3623android中的ImageView只能显示矩形的图片,这样一来不能满足我们其他的需求,比如要显示圆形的图片,这个时候,我们就需要自定义ImageView了,其原理就是首先获取到图片的Bitmap,然后进行裁剪圆形的bitmap...
分类:
移动开发 时间:
2014-12-15 11:51:10
阅读次数:
179
在项目中用到了渐变颜色的进度条样式如下: 1.设置背景色颜色 2.设置边框圆角大小 3.设置渐变的颜色个数 4.设置渐变颜色 5.设置显示,隐藏进度条动画条纹 Demo地址:https://github.com/xqG/gradual-ProgressBar
分类:
其他好文 时间:
2014-12-12 23:22:20
阅读次数:
143
border-radius:20px;radius:以某某为半径画圆。如何制作一个圆形:div{height:150px;//像素的一半,再加上边框的像素 width:150px; border:#0c3 20px solid; border-left-color: red; border-...
分类:
Web程序 时间:
2014-12-12 20:50:04
阅读次数:
149
前缀-moz(例如 -moz-border-radius)用于Firefox-webkit(例如:-webkit-border-radius)用于Safari和Chrome。例1#round { padding:10px; width:300px; height:50px; border...
分类:
Web程序 时间:
2014-12-12 13:11:23
阅读次数:
155
self.imageview=[[UIImageView alloc] init]; self.imageview.frame=CGRectMake(100, 100, 100, 100); [self.view addSubview:self.imageview]; self.imagev...
分类:
其他好文 时间:
2014-12-09 00:20:05
阅读次数:
139
//创建圆角buttonUIButton*button = [UIButtonbuttonWithType:UIButtonTypeRoundedRect]; //指定button的位置和大小button.frame=CGRectMake(10, 10,75,75);//给button设置标签,用来...
分类:
其他好文 时间:
2014-12-08 19:32:40
阅读次数:
168
[box.actionButton.layer setMasksToBounds:YES];[box.actionButton.layer setCornerRadius:10.0];//设置矩形四个圆角半径//边框宽度[box.actionButton.layer setBorderWidth:1...
分类:
其他好文 时间:
2014-12-08 19:09:57
阅读次数:
169
上一篇文章我讲了画矩形和圆形的方法,他们都有原生的canvas绘图函数可完成。而本文讲的圆角矩形则只有通过其他方法模拟出来。一个正常的圆角矩形,我们先假设他四个角的圆角弧度一致——因为这样比较好画。我们动用把面拆成线条的能力,很容易就能发现圆角矩形其实是由4条钩子般的曲线组成。提到钩子,如果你看过我...
分类:
Web程序 时间:
2014-12-08 17:18:42
阅读次数:
210
一、前缀: -moz(例如 -moz-border-radius)用于Firefox -webkit(例如:-webkit-border-radius)用于Safari和Chrome。二、CSS3圆角(所有的) -moz-border-radius: 15px; -webkit-border...
分类:
Web程序 时间:
2014-12-08 12:07:48
阅读次数:
269
//放置按钮 //登录 _loginButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; _loginButton.frame = CGRectMake(20, 300, 280, 35); _loginButton.ba...
分类:
其他好文 时间:
2014-12-06 16:50:34
阅读次数:
129