Get the App
SLTechnology News&Howtos  ›  Development  › 

How does css set the input box to a circle

Shulou Source: shulou.com Published: 2022-06-02 09:47:14 09月13日 Update

What this article shares to you is about how css sets the input box to a circle, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

Method: 1, add "width: diameter value; height: diameter value;" style, set the input box to square; 2, use the "border-radius" attribute to set the square input box to a circle, just add "border-radius:100%;" style to the input box.

The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.

How does css set the input box to a circle

In css, you can first set the input box to square, and then set the fillet of the input box to set the input box to be round.

At this point, you need to use the border-radius attribute, which sets the fillet border of the element.

Examples are as follows:

123 .myinput {width:100px; height:100px; border-radius:100%;}

Output result:

This is how css sets the input box to a circle. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Input circle attribute square square element fillet more style diameter knowledge article utility function that is work meeting tutorial article method environment Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia MySQL Shulou Information Docker