Get the App
SLTechnology News&Howtos  ›  Development  › 

How to make 1/4 Circle in css

Shulou Source: shulou.com Published: 2022-06-02 16:46:51 11月13日 Update

This article mainly explains "how to make a quarter circle in css," interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "how to make a quarter circle in CSS"!

Css method to make a quarter circle: 1. Use width and height attributes to set the width and height of the element equal;2. Use border-radius attribute to set the value of one fillet of the element to the width and height value, and the value of the other three fillets is 0. Syntax "border-radius: width or height value 0 0 0;".

Operating environment of this tutorial: Windows 7 system, CSS3 && HTML5 version, Dell G3 computer.

In CSS, when you mention making circles, you think of the border-radius attribute.

This property can turn a square element of equal width and height into a circle.

p { width: 50px; height: 50px; background-color: #0000FF; border-radius: 50px;}

But sometimes we don't need a whole circle, we just need a part, using a quarter circle. How do we do that?

Or use the border-radius attribute to set the value of one fillet of the element to wide or high, and the value of the other three fillets to 0:

border-radius: 50px 0 0 0;

border-radius: 0 50px 0 0;

border-radius: 0 0 50px 0;

border-radius: 0 0 0 50px;

At this point, I believe that everyone has a deeper understanding of "how to make a quarter circle in css," so you may wish to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Tags: Production attributes elements fillets content methods learning practical deeper interest practicality practical easy to operate tutorials more friends square square environment computer Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Microsoft macOS MySQL Shulou Information