Corner radius bằng bao nhiêu to 45

one detail that i should have added is that this manifests for me when i enlarge the round-corner shape to use as outer framing for a larger diagram.

at default size the round-corner shape looks fine, but when enlarged, the corner scales proportionately and it ends up being too pronounced at larger sizes. one side effect of this is that text aligned to a corner [e.g. top/left] actually touches the border.

 

Userlevel 6

+4

  • Jonathan White

  • Group Leader
  • 110 replies
  • Answer

@tony k I learned a trick to alter the severity of the rounded cornering. You cannot have a border on the shape, which might be a deal-breaker for some, but this solution works pretty well otherwise. Once you have a shape with corners you like, you can template it or copy and paste it on your board to use multiple times.

Check it out HERE.

Jon

Userlevel 4

  • Michael Sohn

  • Retired Community Member
  • 75 replies

Hi@tony k,

Ah, I see. Check out@Jonathan White’s clip on a potential workaround!

Michael Sohn

Userlevel 6

+1

  • Kyle.C

  • Active Contributor
  • 68 replies

Some genius stuff from@Jonathan White 

I gotta keep that in my toolbox.

I

  • IconDaddy

  • New Here
  • 1 reply

You can use the Wireframes components in the Apps area. Take a Text area and delete the text and the corners are consistent no matter how big you make the field 

Limitations:

  • the outline size grows and shrinks with the size of the box
  • limited color - grey and red - there is a blue, but its a focused state and has a hard coded cursor line in it

 this works for bigger boxes and at least you can get the outline - hope this helps

C

  • Chad Bishop

  • New Here
  • 1 reply

Please fix this. Corner radius should not change based on width, user should be able to match radius of larger and smaller boxes, and stroke width should not change based on size of box.

Những nhà máy bán kính cán góc Betalent được làm bởi những thanh sắt carbide chất cao và được thiết kế bởi những nhà thiết kế hàng xa chuyên nghiệp với góc lưỡi hợp lý, hình lưỡi dao, số loại sáo, và rãnh nhỏ.Và tất cả những loại máy xay cuối kiểu này được cấu tạo bởi máy xay Walter 5 được nhập khẩu để đạt mức độ chính xác cao.Sau đó, một loại thụ động đặc biệt và một lớp phủ đích thực được làm cho các nhà máy kết thúc hoàn hảo để làm cho cối xay cuối cứng hơn và lâu hơn.

Có bốn loại carbide được áp dụng cho các nhà máy sản xuất bằng phẳng chung:

BTS45, cho các nguyên liệu làm khô có độ cứng từ cao HC4 đến cao HC4 Cao cấp, loại trụ P, K, và loại thép không rỉ mềm hơn thuộc nhóm M trong phân loại ISO.

BT50, cho HRC tới HRC 33degree, chủ yếu là M, N, và K.

BTChừng, cho HRC-54th, cho mảnh ghép S, M và K.BJDZ BTK, cho loại HRC 60 đến 65, cho những chất liệu bị dập [HRC khoảng cách], gỗ cứng, và bột kết thúc của SUS XI6L, phần lớn tác phẩm dưới lớp ISO H.

You can give any element “rounded corners” by applying a

border-radius: {1,4} [ / {1,4} ]?
0 through CSS. You’ll only notice if there is a color change involved. For instance, if the element has a background-color or border that is different than the element it’s above.

.element {
  border-radius: 10px;
}

 

 

Constituent properties

border-radius: {1,4} [ / {1,4} ]?
0 is what we call a “shorthand” property. That means it sets the following individual properties in a single declaration:

  • border-radius: {1,4} [ / {1,4} ]?
    2
  • border-radius: {1,4} [ / {1,4} ]?
    3
  • border-radius: {1,4} [ / {1,4} ]?
    4
  • border-radius: {1,4} [ / {1,4} ]?
    5

Logical properties

Those are referred to as “physical” properties because they set the radius according to the physical location of the corner [e.g. top-left]. But

border-radius: {1,4} [ / {1,4} ]?
0 is part of the Logical Properies and Values specification, meaning it has logical equivalents of the physical properties:

Physical propertyLogical property
border-radius: {1,4} [ / {1,4} ]?
2
border-radius: {1,4} [ / {1,4} ]?
8
border-radius: {1,4} [ / {1,4} ]?
3
/* Single value */
/* Sets all four corners */
border-radius: 10px;

/* Two values /*
/* top-left and bottom-right top-right and bottom-left  */
border-radius: 25% 0;

/* Three values */
/* top-left top-right/bottom-left bottom-right */
border-radius: 1rem 1.5rem 1.25rem;

/* Four values */
/* top-left top-right bottom-right bottom-left */
border-radius: 8px 10px 12px 14px;

/* Global values */
border-radius: inherit;
border-radius: initial;
border-radius: revert;
border-radius: revert-layer;
border-radius: unset;
0
border-radius: {1,4} [ / {1,4} ]?
5
/* Single value */
/* Sets all four corners */
border-radius: 10px;

/* Two values /*
/* top-left and bottom-right top-right and bottom-left  */
border-radius: 25% 0;

/* Three values */
/* top-left top-right/bottom-left bottom-right */
border-radius: 1rem 1.5rem 1.25rem;

/* Four values */
/* top-left top-right bottom-right bottom-left */
border-radius: 8px 10px 12px 14px;

/* Global values */
border-radius: inherit;
border-radius: initial;
border-radius: revert;
border-radius: revert-layer;
border-radius: unset;
2
border-radius: {1,4} [ / {1,4} ]?
4
/* Single value */
/* Sets all four corners */
border-radius: 10px;

/* Two values /*
/* top-left and bottom-right top-right and bottom-left  */
border-radius: 25% 0;

/* Three values */
/* top-left top-right/bottom-left bottom-right */
border-radius: 1rem 1.5rem 1.25rem;

/* Four values */
/* top-left top-right bottom-right bottom-left */
border-radius: 8px 10px 12px 14px;

/* Global values */
border-radius: inherit;
border-radius: initial;
border-radius: revert;
border-radius: revert-layer;
border-radius: unset;
4

It’s a bit mind-bendy at first, but the order really matters, especially when working with

border-radius: {1,4} [ / {1,4} ]?
0 as a shorthand. The order goes like this, where the first direction refers to the block direction and the second direction refers to the inline direction.

Physical propertyLogical property
/* Single value */
/* Sets all four corners */
border-radius: 10px;

/* Two values /*
/* top-left and bottom-right top-right and bottom-left  */
border-radius: 25% 0;

/* Three values */
/* top-left top-right/bottom-left bottom-right */
border-radius: 1rem 1.5rem 1.25rem;

/* Four values */
/* top-left top-right bottom-right bottom-left */
border-radius: 8px 10px 12px 14px;

/* Global values */
border-radius: inherit;
border-radius: initial;
border-radius: revert;
border-radius: revert-layer;
border-radius: unset;
6
/* Single value */
/* Sets all four corners */
border-radius: 10px;

/* Two values /*
/* top-left and bottom-right top-right and bottom-left  */
border-radius: 25% 0;

/* Three values */
/* top-left top-right/bottom-left bottom-right */
border-radius: 1rem 1.5rem 1.25rem;

/* Four values */
/* top-left top-right bottom-right bottom-left */
border-radius: 8px 10px 12px 14px;

/* Global values */
border-radius: inherit;
border-radius: initial;
border-radius: revert;
border-radius: revert-layer;
border-radius: unset;
7
/* Single value */
/* Sets all four corners */
border-radius: 10px;

/* Two values /*
/* top-left and bottom-right top-right and bottom-left  */
border-radius: 25% 0;

/* Three values */
/* top-left top-right/bottom-left bottom-right */
border-radius: 1rem 1.5rem 1.25rem;

/* Four values */
/* top-left top-right bottom-right bottom-left */
border-radius: 8px 10px 12px 14px;

/* Global values */
border-radius: inherit;
border-radius: initial;
border-radius: revert;
border-radius: revert-layer;
border-radius: unset;
8
/* Single value */
/* Sets all four corners */
border-radius: 10px;

/* Two values /*
/* top-left and bottom-right top-right and bottom-left  */
border-radius: 25% 0;

/* Three values */
/* top-left top-right/bottom-left bottom-right */
border-radius: 1rem 1.5rem 1.25rem;

/* Four values */
/* top-left top-right bottom-right bottom-left */
border-radius: 8px 10px 12px 14px;

/* Global values */
border-radius: inherit;
border-radius: initial;
border-radius: revert;
border-radius: revert-layer;
border-radius: unset;
9
.element {
  /* top-left top-right/bottom-left bottom-right */
  border-radius: 5px 20px 5px;
  background: #BADA55;
}
0
.element {
  /* top-left top-right/bottom-left bottom-right */
  border-radius: 5px 20px 5px;
  background: #BADA55;
}
1
.element {
  /* top-left top-right/bottom-left bottom-right */
  border-radius: 5px 20px 5px;
  background: #BADA55;
}
2
.element {
  /* top-left top-right/bottom-left bottom-right */
  border-radius: 5px 20px 5px;
  background: #BADA55;
}
3

Syntax

border-radius: {1,4} [ / {1,4} ]?
  • Initial value:
    .element {
      /* top-left top-right/bottom-left bottom-right */
      border-radius: 5px 20px 5px;
      background: #BADA55;
    }
    4
  • Applies to: all elements
  • Inherited: no
  • Computed values: pair of computed  values
  • Animation: by computed value

The

border-radius: {1,4} [ / {1,4} ]?
0 property takes between one and four length or percentage values, where one value sets the radius for all four corners at once, while four sets each individual corner.

/* Single value */
/* Sets all four corners */
border-radius: 10px;

/* Two values /*
/* top-left and bottom-right top-right and bottom-left  */
border-radius: 25% 0;

/* Three values */
/* top-left top-right/bottom-left bottom-right */
border-radius: 1rem 1.5rem 1.25rem;

/* Four values */
/* top-left top-right bottom-right bottom-left */
border-radius: 8px 10px 12px 14px;

/* Global values */
border-radius: inherit;
border-radius: initial;
border-radius: revert;
border-radius: revert-layer;
border-radius: unset;

So, if we wanted to set a different radius on the top-left and bottom-right but apply the same radius on the top-right and bottom-left together, we can use the three-value syntax:

.element {
  /* top-left top-right/bottom-left bottom-right */
  border-radius: 5px 20px 5px;
  background: #BADA55;
}

 

 

Elliptical rounding [
.element {
  /* top-left top-right/bottom-left bottom-right */
  border-radius: 5px 20px 5px;
  background: #BADA55;
}
6]

You may also specify the radiuses in which the corner is rounded by. In other words, the rounding doesn’t have to be perfectly circular, it can be elliptical. This is done using a slash [

.element {
  /* top-left top-right/bottom-left bottom-right */
  border-radius: 5px 20px 5px;
  background: #BADA55;
}
6] between two values:

.element {
  border-radius: 10px / 30px; /* horizontal radius / vertical radius */
}

 

 

Note: Firefox only supported elliptical borders in 3.5+. Older WebKit browsers [e.g. Safari 4 and below] incorrectly treat

.element {
  /* top-left top-right/bottom-left bottom-right */
  border-radius: 5px 20px 5px;
  background: #BADA55;
}
8 the same as
.element {
  /* top-left top-right/bottom-left bottom-right */
  border-radius: 5px 20px 5px;
  background: #BADA55;
}
9.

Values

The

border-radius: {1,4} [ / {1,4} ]?
0 property can accept any valid CSS length unit. That means everything from
.element {
  border-radius: 10px / 30px; /* horizontal radius / vertical radius */
}
1,
.element {
  border-radius: 10px / 30px; /* horizontal radius / vertical radius */
}
2,
.element {
  border-radius: 10px / 30px; /* horizontal radius / vertical radius */
}
3,
.element {
  border-radius: 10px / 30px; /* horizontal radius / vertical radius */
}
4,
.element {
  border-radius: 10px / 30px; /* horizontal radius / vertical radius */
}
5,
.element {
  border-radius: 10px / 30px; /* horizontal radius / vertical radius */
}
6, and a whole bunch more are fair play.

You may specify the value of

border-radius: {1,4} [ / {1,4} ]?
0 in percentages. This is particularly useful for creating a circle or ellipse shape, but can be used any time you want the
border-radius: {1,4} [ / {1,4} ]?
0 to be directly correlated with the element’s width.

.element {
  border-radius: 50%;
  width: 200px;
}

 

 

Note: In Safari percentage values for

border-radius: {1,4} [ / {1,4} ]?
0 only supported in 5.1+. In Opera, only supported in 11.5+.

Gotchas

There are a few things to watch for when working with the

border-radius: {1,4} [ / {1,4} ]?
0 property:

Clipped background images

If the element has an image background, it will be clipped at the rounded corner naturally:

.element {
  border-radius: 20px;
  background: url[bglines.png]; /* will get clipped */
}

Background color bleed

Sometimes you can see a

.element {
  border-radius: 50%;
  width: 200px;
}
1 “leak” outside of a border when
border-radius: {1,4} [ / {1,4} ]?
0 is present [here’s a perfect example]. To prevent this you use the CSS
.element {
  border-radius: 50%;
  width: 200px;
}
3 property:

.element {
  border-radius: 10px;

  /* Prevent background color leak outs */
  -webkit-background-clip: padding-box; 
  -moz-background-clip:    padding; 
  background-clip:         padding-box;
}

Overlapping border radii

Jay Sitter covered what happens when the value of one corner radius is so big that it overlaps the radius of another corner. Like this example, where we’re going for a “pill” shape on the right side with less rounding on the left:

CodePen Embed Fallback

We’re swtting a radius of

.element {
  border-radius: 50%;
  width: 200px;
}
4 on the top-left and bottom-left corners, so why are they so boxy? That’s because the
.element {
  border-radius: 50%;
  width: 200px;
}
5 value of the other two corners is covering them up. Jay digs deep into the math behind this and how to prevent it from happening, so it’s worth reading his article for more context.

Demo

CodePen Embed Fallback

Browser support

This browser support data is from , which has more detail. A number indicates that browser supports the feature at that version and up.

Desktop

ChromeFirefoxIEEdgeSafari4*3*9123.1*

Mobile / Tablet

Android ChromeAndroid FirefoxAndroidiOS Safari1121102.1*3.2*

It’s unnecessary now, but for the absolute best possible browser support, you could prefix the property with

.element {
  border-radius: 50%;
  width: 200px;
}
6 and
.element {
  border-radius: 50%;
  width: 200px;
}
7 to ensure legacy browsers can join the fun:

.element {
  /* Safari 3-4, iOS 1-3.2, Android 1.6- */
  -webkit-border-radius: 12px; 

  /* Firefox 1-3.6 */
  -moz-border-radius: 12px; 
  
  /* Opera 10.5, IE 9, Safari 5, Chrome, Firefox 4, iOS 4, Android 2.1+ */
  border-radius: 12px; 
}

Notice the order of those properties: the vendor prefixes are listed first and the non-prefixed “spec” version is listed last. This is the correct way to do it. Border radius is a particularly good example of why we do it that way. In slightly more complicated version of using

border-radius: {1,4} [ / {1,4} ]?
0 [where you pass two values instead of one], the older
.element {
  border-radius: 50%;
  width: 200px;
}
6 vendor prefix would do something entirely different than the “spec” version. So, if we blindly copy-and-paste the same values to all three properties, we could see different results cross-browser. For the most consistency long-term, it’s best to list the “spec” version last.

It’s pretty realistic these days to drop prefixes and just use vanilla

border-radius: {1,4} [ / {1,4} ]?
0, as discussed here.

Here’s each individual property, with vendor prefixes:

.element {
  -webkit-border-top-left-radius: 1px;
  -webkit-border-top-right-radius: 2px;
  -webkit-border-bottom-right-radius: 3px;
  -webkit-border-bottom-left-radius: 4px;

  -moz-border-radius-topleft: 1px;
  -moz-border-radius-topright: 2px;
  -moz-border-radius-bottomright: 3px;
  -moz-border-radius-bottomleft: 4px;

  border-top-left-radius: 1px;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 4px;
}

Each of these values can have a space-separated value as well, like

.element {
  border-radius: 20px;
  background: url[bglines.png]; /* will get clipped */
}
1, which behaves the same as a slash-separated value in shorthand [
.element {
  border-radius: 20px;
  background: url[bglines.png]; /* will get clipped */
}
2
.element {
  border-radius: 20px;
  background: url[bglines.png]; /* will get clipped */
}
3
.element {
  border-radius: 20px;
  background: url[bglines.png]; /* will get clipped */
}
4].

Chủ Đề