rounded-corners

Creating rounded corners in IE7 / IE8

亡梦爱人 提交于 2019-11-28 07:22:31
问题 I am creating a rounded corners tabs, that works fine in IE9, Mozilla and Chrome, but not in IE7/IE8. Here is the code: <div id="navbar"> <div id="holder"> <ul> <li><a href="#">Home</a></li> <li><a href="#">About Us</a></li> <li><a href="#">Contact Us</a></li> <li><a href="#">News</a></li> </ul> </div> </div> #navbar {} #holder { border-bottom:1px solid #000; overflow:hidden; } #navbar #holder ul { margin:0; padding:0; list-style:none; margin-top:15px; } #navbar #holder ul li { } #navbar

jquery round corners

 ̄綄美尐妖づ 提交于 2019-11-28 05:29:05
问题 This probably sounds really stupid but I have noo idea how to implement jquery's rounded corners (http://www.methvin.com/jquery/jq-corner-demo.html). My javascript-fu is complete fail and I can't seem to get it to work on my page. Can anyone show me a simple example of the HTML and JavaScript you would use to get them to show? Apologies for my idiocy. 回答1: This thing does not work in Safari & Google Chrome. You need to include jquery.js in your page. Don't forget to have a separate closing

Smoothing a rounded stroke in Core Graphics

我是研究僧i 提交于 2019-11-28 04:52:53
问题 I am creating my own UITableViewCells with a gradient background. I have all the logic and drawing worked out, but one thing I want to fix is the "chunkiness" around the corners of my custom cell: alt text http://grab.by/27SM If you zoom in on the corners, you can see what I am talking about. Here is the code I a using to generate the cell: CGContextRef c = UIGraphicsGetCurrentContext(); CGColorSpaceRef myColorspace = CGColorSpaceCreateDeviceRGB(); CGGradientRef myGradient = nil; CGFloat

IOS: create a UIImage or UIImageView with rounded corners

拜拜、爱过 提交于 2019-11-28 02:41:37
Is it possible create an UIImage or an UIImageView with rounded corners? Because I want take an UIImage and show it inside an UIImageView , but I don't know how to do it. yinkou Yes, it is possible. Import the QuartzCore ( #import <QuartzCore/QuartzCore.h> ) header and play with the layer property of the UIImageView . yourImageView.layer.cornerRadius = yourRadius; yourImageView.clipsToBounds = YES; See the CALayer class reference for more info. Try this Code For Round Image Import QuartzCore framework simple way to create Round Image imageView.layer.backgroundColor=[[UIColor clearColor]

How to set button selection color along with rounded corners in android?

痞子三分冷 提交于 2019-11-28 02:41:02
问题 I want to set a rounded corner for a button in android along with changing the button color on when selected. I am doing the following things. drawable/push_button.xml <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:state_pressed="true" android:drawable="@color/green"/> <item android:state_focused="true" android:drawable="@color/green"/> <item android:state_focused="false" android:drawable="@color/green"/> <item

How to round the corners of a button

旧时模样 提交于 2019-11-28 02:35:39
I have a rectangle image (jpg) and want to use it to fill the background of a button with rounded corner in xcode. I wrote the following: UIButton *button = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; CGRect frame = CGRectMake(x, y, cardWidth, cardHeight); button.frame = frame; [button setBackgroundImage:backImage forState:UIControlStateNormal]; However, the button I get with that approach doesn't have its corners rounded: it is instead a plain rectangle that looks exactly like my original image. How can I get instead an image with rounded corner to represent my button? Thanks!

How can I work around Android issue 9161, where bottomRightRadius and bottomLeftRadius are swapped?

只谈情不闲聊 提交于 2019-11-27 20:37:27
My goal: Figure 1: The Goal So, before I knew about the issue, here's what I tried. First, a base layout: <LinearLayout android:orientation="horizontal" android:layout_below="@id/heading" android:layout_marginTop="10dp" android:layout_width="@dimen/horizontal_two_button_width" android:layout_height="@dimen/button_height_small" > <Button android:id="@+id/button_one" android:layout_width="0dp" android:layout_weight="1.0" android:layout_height="fill_parent" android:padding="10dp" style="@style/ButtonText" android:background="@drawable/button_left_green" /> <Button android:id="@+id/button_two"

CSS to create curved corner between two elements?

∥☆過路亽.° 提交于 2019-11-27 20:18:42
问题 My UI has an unordered list on the left. When a list item is selected, a div appears on the right of it. I'd like to have a curved outer corner where the <li> and the <div> meet. Some people call this a negative border radius or an inverted corner . See the white arrow in the image below. To extend the blue <li> to the edge of the <ul> , I'm planning to do something like this: li { right-margin: 2em; border-radius: 8px; } li.active { right-margin: 0; border-bottom-right-radius: 0; border-top

How do I make an UIImage/-View with rounded corners CGRect (Swift)

谁都会走 提交于 2019-11-27 20:01:27
问题 How do I make a UIImageView with rounded corners on a Swift iOS Playground? Inside it needs to be filled with a color. 回答1: let imageView = UIImageView(frame: CGRectMake(0, 0, 100, 100)) imageView.backgroundColor = UIColor.redColor() imageView.layer.cornerRadius = 8.0 imageView.clipsToBounds = true Result: 回答2: For rounded circle image frame in swift, what it worked for me was: self.profileImageView.image = UIImage(named:"profileUser") self.profileImageView.layer.cornerRadius = self

Java rounded corners on JFrame?

╄→гoц情女王★ 提交于 2019-11-27 18:41:25
问题 I have a login JFrame for my application and i would like to make the corners of the frame rounded by a few pixles. Id like to do this without using transparency on the JFrame and having to use a background image inside a JPanel - is this possible? 回答1: It's possible with undecorated frame, consider the following example: JFrame frame = new JFrame(); frame.setUndecorated(true); frame.setShape(new RoundRectangle2D.Double(10, 10, 100, 100, 50, 50)); frame.setSize(300, 200); frame.setVisible