rounded-corners

How to make a rounded oval button?

别等时光非礼了梦想. 提交于 2019-12-01 23:16:35
My goal is to make my button look like this: minus the black edges around the button. After reading quite a few posts, I see most solutions saying to use layer.cornerRadius = 10.0 When I do that I get this: It rounds the edges, but doesn't give me my desired goal. Any suggestion? Rob Swift 3 myButton.layer.cornerRadius = myButton.frame.height / 2 myButton.backgroundColor = UIColor.blue myButton.clipsToBounds = true myButton.tintColor = UIColor.white myButton.setTitle("Connect With Facebook", for: .normal) You Can do it like this (For Example if you button is called button): button.layer

chrome/safari loses rounded corners during a jQuery slide transition

▼魔方 西西 提交于 2019-12-01 23:10:21
I am using the jquery script shown here - http://jqueryfordesigners.com/automatic-infinite-carousel/ . I have applied my own images as rounded png's into the slider on my site - http://67.225.219.80/ All is well in firefox and IE9 using border-radius. You can see the rounded corners are maintained even with the slider is sliding during auto mode and even when the slider is controlled by the arrows. However in chrome/safari, the rounded corners disappear during the transition. In addition to giving the outer div wrapper rounded corners (border-radius, -webkit-border-radius, etc.), I have also

.NET GDI+: Drawing lines with rounded corners

蹲街弑〆低调 提交于 2019-12-01 21:44:33
Given an array of points, it is easy to draw a line based on these, e.g. using the GraphicsPath class. For instance, the following array of points... [0]: (0,0) [1]: (100,0) [2]: (0,100) [3]: (100,100) ...describes a line that resembles a Z. But here comes the challenge; I need to draw rounded corners with a radius of e.g. 10 pixels. By corners I mean the points in the line that aren't start or end points. In this case there are two corners at (0,100) and (100,0) . I've played around with beziers, curves and arcs, some of which might hold the solution - I just haven't been able to find it

How do I create a WPF rounded container that clips children?

你说的曾经没有我的故事 提交于 2019-12-01 20:44:07
The following piece of code is supposed to draw a menu bar inside a rounded container. You'll notice that the bottom is rounded, but the corners of the menu aren't. I followed the directions of chosen answer because it appeared to be the most efficient: How do I create a WPF Rounded Corner container? For the record, I am running .NET 4.5 with the latest version of WPF. Here's my code: <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="240" Height="320" Background="Black" > <Border BorderBrush="Red"

Chrome image border around rounded corners disappearing

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 18:04:43
So, this is the problem: http://bildr.no/view/927562 A closer look: http://bildr.no/view/927563 As you can see, the border for each corner turns invisible. This is the CSS code for the image: #contentImage { float: left; border: 1px solid #C4C4C4; border-radius: 8px; margin-right: 25px; } <img src="images/image.jpg" id=contentImage" /> Any help would be greatly appreciated :-) methodofaction This is an unfortunate webkit bug. The only workaround that I know about is converting your img into a div and then putting the img as a background image: #contentImage { background: url('http://placehold

Rounded corners on images using PHP?

女生的网名这么多〃 提交于 2019-12-01 13:39:31
Does anyone know how to make a image have rounded corners using a PHP script? It can be done using php-gd, but I ended up passing that task to the browser, using CSS: <img src="photo.jpg" width="42" height="42" alt="My cool photo" style="border-radius: 15px; -moz-border-radius: 15px;" /> This script shows how to apply rounded corners to images using PHP and GD Library . It is as simple as drawing four quadrants of a circle over the four corners of the image. The circle itself has to be transparent. This script, on the other hand, generates rounded corner graphics for HTML or CSS based

css3 menu with inverse rounded corners

落爺英雄遲暮 提交于 2019-12-01 11:14:20
I designed a navigation menu which looks like the image here: I want to code it with css3 rounded corners and box-shadows, not using any images. Problem is the rounded corner to the left of the first menu-item, and the one to the right of the menu... I call it a "reverse" rounded corner... It should have to change color on :hover . Is there any way to get this done in css only? And how? HTML <div class="menu"> <div class="outer_bg_left"> <div class="outer"> <div class="outer_shadow"> </div> </div> </div> <ul> <li class="menu_item_cont"><div class="menu_item">Item 1</div></li> <li class="menu

Can you do CSS rounded corners in IE without using images?

不羁岁月 提交于 2019-12-01 11:03:56
Is there any way to make a rounded border in IE without using images using CSS only, or any other easy way? I have checked other questions like this on Stack Overflow, but I’m not getting an exact way. MatTheCat Keep as bookmark : http://www.smashingmagazine.com/2010/04/28/css3-solutions-for-internet-explorer/ ;) For border-radius specifically, see http://code.google.com/p/curved-corner/ You can do on for I9 only as it supports border-radius css property. Otherwise it seems to be difficult without images. 来源: https://stackoverflow.com/questions/4142876/can-you-do-css-rounded-corners-in-ie

How to create a JButton extension with rounded corners?

青春壹個敷衍的年華 提交于 2019-12-01 10:38:36
This is a continuation of the question "Java rounded Swing JButton" . I have searched for an extension of javax.swing.JButton which will inherit all runtime behavior and just override drawing of the corners. Using the code given by noah.w on sun forums page the result looks like this: I'd like to be able to have the same gradient in the background, on mouse over change etc. Does anybody know how to do that? Code which creates the Java Swing window from the picture is: public class XrButton extends JButton implements MouseListener { private static final long serialVersionUID =

Rounded corners on images using PHP?

左心房为你撑大大i 提交于 2019-12-01 10:28:20
问题 Does anyone know how to make a image have rounded corners using a PHP script? 回答1: It can be done using php-gd, but I ended up passing that task to the browser, using CSS: <img src="photo.jpg" width="42" height="42" alt="My cool photo" style="border-radius: 15px; -moz-border-radius: 15px;" /> 回答2: This script shows how to apply rounded corners to images using PHP and GD Library. It is as simple as drawing four quadrants of a circle over the four corners of the image. The circle itself has to