rounded-corners

CSS3 Rounded corner for input element without js/images

橙三吉。 提交于 2019-12-03 15:45:30
Who I can make the rounded corner for input elements? I need a way without using javascript and images.. Added: <!DOCTYPE html> <html> <head> <title>xx</title> <style type="text/css"> input { -webkit-border-radius: 15px; -moz-border-radius: 15px; border-radius: 15px; } </style> </head> <body> <input type="text" value="test" /> </body> </html> It does not work in firefox 3.6.12! CSS3 has many new features that benefit web designers. This includes border rounding: input { -webkit-border-radius: 5px; //For Safari, etc. -moz-border-radius: 5px; //For Mozilla, etc. border-radius: 5px; //CSS3

Rounded rect with Gradient color

时光毁灭记忆、已成空白 提交于 2019-12-03 14:58:52
I have not really done much programming with Core Graphics. And I tend to stick with QuartzCore now that it does a lot of what I need through the layer property :) However, I have a UIView, which is currently gradient. I'd like to add rounded corners to this UIView and the layer property does not do this when I draw the gradient: - (void)drawRect:(CGRect)rect { CGContextRef currentContext = UIGraphicsGetCurrentContext(); CGGradientRef glossGradient; CGColorSpaceRef rgbColorspace; size_t num_locations = 2; CGFloat locations[2] = { 0.0, 1.0 }; CGFloat components[8] = { 1.0, 1.0, 1.0, 0.95, //

Rounding corners of UIModalPresentationFormSheet

浪尽此生 提交于 2019-12-03 14:08:37
问题 forgive me if this is an obvious question i am relatively new. I have a modal view which i set up with a custom size and rounded corners: - (void)viewWillLayoutSubviews{ [super viewWillLayoutSubviews]; self.view.superview.bounds = CGRectMake(0, 0, 600, 450); self.view.layer.cornerRadius = 60.0; } However i find that when i round the view corners, i get this greyish colour appear on the edges of it (as if theres something else behind it) : (see picture). How do i remove these greyish edges so

How do I add a UIImage to grouped UITableViewCell so it rounds the corners?

…衆ロ難τιáo~ 提交于 2019-12-03 12:07:35
I'm trying to add images to table cells in a grouped UITableView but the corners of the images are not clipped. What's the best way to go about clipping these (besides clipping them in Photoshop? The table contents are dynamic.) For example, the first image in a table would need the top left corner rounded only. This was my solution, which could use a little refactoring: void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWidth, float ovalHeight, BOOL top, BOOL bottom) { float fw, fh; if (ovalWidth == 0 || ovalHeight == 0) { CGContextAddRect(context, rect); return; }

Using UIBezierPath:byRoundingCorners: with Swift 2 and Swift 3

假如想象 提交于 2019-12-03 11:06:59
问题 I'm using this code to make 2 corners of a button rounded. let buttonPath = UIBezierPath(roundedRect: button.bounds, byRoundingCorners: .TopLeft | .BottomLeft, cornerRadii: CGSizeMake(1.0, 1.0)) It throws an error: binary operator '|' cannot be applied to two UIRectCorner operands. How do I use this method in Swift 2.0? 回答1: Swift 2: let buttonPath = UIBezierPath(roundedRect: button.bounds, byRoundingCorners: [.TopLeft , .BottomLeft], cornerRadii: CGSizeMake(1.0, 1.0)) Swift 3 and Swift 4:

How to draw a rounded rectangle (rectangle with rounded corners) with OpenCV?

☆樱花仙子☆ 提交于 2019-12-03 10:28:58
问题 How can I draw a rectangle with rounded corners in OpenCV? I know that the functions ellipse() and line() can be simply put together to draw it. I just wonder if someone has done it before and has put it in a proper function so I can use it? Ideally the corner radius is to calibrate in a parameter. I searched a lot for that, but it seems no one had that problem before. If no one has such I function I will probably post my own solution here in a few days. 回答1: I realized, this is much easier

What rounded corner approach should I take?

时光怂恿深爱的人放手 提交于 2019-12-03 08:44:47
So there's no shortage of information out there on rounded corners and I've been through much of it and I'm posting to get the opinions of the communities on this point. My scenario is that we're developing a rounded corner dependent design, mainly used for interactions ( <button> and <a> ). We are going to use border radius for the good browsers on the block that play nice with it and then use the server to send down JavaScript to browsers that don't. What I'm wondering is what to use to up scale the browsers that ignore border radius CSS? I need something that works on button as well as a,

Rounded rect on NSView that clips all containing subviews

半世苍凉 提交于 2019-12-03 05:21:30
I am creating a NSView subclass that has rounded corners. This view is meant to be a container and other subviews will be added to it. I am trying to get the rounded corners of the NSView to clip all of the subview's corners as well, but am not able to get it. - (void)drawRect:(NSRect)dirtyRect { NSRect rect = [self bounds]; NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:self.radius yRadius:self.radius]; [path addClip]; [[NSColor redColor] set]; NSRectFill(dirtyRect); [super drawRect:dirtyRect]; } The red is just for example. If I add a subview to the rect, The

How to rounded the corners when I draw rectangle using UIBezierPath points

*爱你&永不变心* 提交于 2019-12-03 04:49:42
I crated a rectangle using UIBezierPath adding point by point, now I want to rounded the corners of this rectangle but seems there are no way to do it. can anyone help me ? class RectangleLayer: CAShapeLayer { let animationDuration: CFTimeInterval = 0.5 override init() { super.init() fillColor = Colors.clear.CGColor lineWidth = 5.0 path = rectanglePathStart.CGPath } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } var rectanglePathStart: UIBezierPath { let rectanglePath = UIBezierPath() rectanglePath.moveToPoint(CGPoint(x: 0.0, y: 100.0))

jQuery round corner code for IE8 in standards mode?

妖精的绣舞 提交于 2019-12-03 03:14:30
问题 I need a solution for round corners using javascript with or without jQuery in IE8 standards mode. 回答1: This seems to work in ie8 : try it... Update 11-10-2010: You can also try to include PIE.HTC and call that from your stylesheet. for more information see the CSS3PIE website. It is a much better solution! 回答2: jQuery corner() seems to work correctly in IE8 standards mode. Seems to be the go-to corner plugin for jQuery, too. 回答3: I've had good luck with dd_roundies. It doesn't use jQuery and