简体   繁体   English

创建没有边界半径的圆形块

[英]Create rounded block without border-radius

I create my own website and I can't understand how correctly create rounded block (see red rectangle in the picture here: https://dl.dropboxusercontent.com/u/43315655/planeto-template.jpg ) 我创建了自己的网站,但我不明白如何正确创建圆形块(请参见此处图片中的红色矩形: https : //dl.dropboxusercontent.com/u/43315655/planeto-template.jpg

This block will be display at different screens (from 960 px to HD). 该块将显示在不同的屏幕上(从960 px到高清)。 I have tried to do with border-radius but it's wrong. 我已经尝试过使用边界半径,但这是错误的。

Please, help me with any links, advice or code examples :) 请帮助我提供任何链接,建议或代码示例:)

The image you posted is an HTML template. 您发布的图像是HTML模板。 If they did it, don'T you think it is possible? 如果他们做到了,您不认为有可能吗?

It is, just put a border on bottom left and bottom right. 就是说,只需在左下方和右下方放置一个边框即可。 One value is 100% and the other is the height you want the curve to stop : 一个值是100%,另一个是您希望曲线停止的高度:

border-bottom-right-radius : 100% 100px;
border-bottom-left-radius : 100% 100px;

Fiddle : http://jsfiddle.net/yqf9a/1/ 小提琴: http : //jsfiddle.net/yqf9a/1/

I'm not quite sure what you don't understand about border-radius, but the W3C Wiki explains the use of the border-radius property pretty good: http://www.w3schools.com/cssref/css3_pr_border-radius.asp 我不太确定您对边界半径不了解什么,但是W3C Wiki很好地解释了如何使用border-radius属性: http : //www.w3schools.com/cssref/css3_pr_border-radius.asp

Also try the CSS Border Radius Generator: http://border-radius.com/ 也可以尝试CSS Border Radius Generator: http : //border-radius.com/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM